got two times wrong answer.
Can anyone help me?
#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int value=0;
int diff;
for(int i=1;i<=n;i++)
{
int coin_no;
cin>>coin_no;
for(int x=1;x<=coin_no;x++)
{
int val;
cin>>val;
value=value+val;
}
diff=value%2 ...
Search found 3 matches
- Thu Jun 09, 2011 4:41 pm
- Forum: Volume 5 (500-599)
- Topic: 562 - Dividing coins
- Replies: 73
- Views: 44248
- Fri Jun 03, 2011 5:46 am
- Forum: Volume 101 (10100-10199)
- Topic: 10195 - The Knights Of The Round Table
- Replies: 59
- Views: 22779
Re: 10195 - The Knights Of The Round Table
adnan_iut -------thank u for reply. but i still get wrong answer. here is the code with corrected 0.000
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
double a,b,c;
while(cin>>a>>b>>c)
{
if(cin.eof())
break;
if(a!=0 && b!=0 && c!=0)
{
double x=(a+b+c)/2;
float r;
x ...
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
double a,b,c;
while(cin>>a>>b>>c)
{
if(cin.eof())
break;
if(a!=0 && b!=0 && c!=0)
{
double x=(a+b+c)/2;
float r;
x ...
- Wed May 18, 2011 4:18 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10195 - The Knights Of The Round Table
- Replies: 59
- Views: 22779
Re: 10195 - The Knights Of The Round Table
What is the wrong with this code?
Can anyone help me pls.............
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
double a,b,c;
while(cin>>a>>b>>c)
{
if(cin.eof())
break;
if(a!=0 && b!=0 && c!=0)
{
double x=(a+b+c)/2;
float r;
x=sqrt(((x-a)*(x-b)*(x-c))/x ...
Can anyone help me pls.............
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
double a,b,c;
while(cin>>a>>b>>c)
{
if(cin.eof())
break;
if(a!=0 && b!=0 && c!=0)
{
double x=(a+b+c)/2;
float r;
x=sqrt(((x-a)*(x-b)*(x-c))/x ...