Page 3 of 3
WHATS WRONG 10509???
Posted: Sun Jan 16, 2005 12:03 pm
by Rocky
MY OUTPUT FOR THE CORRESPONDING INPUT 1.0000 IS :->
INPUT:
1.0000
OUTPUT:
1.0000
WHAT IS THE RIGHT?????
THANK'S
ROCKY.
Posted: Sun Jan 16, 2005 7:42 pm
by Zuberul
yes thats right
now... i cant tell much.because its a straight forward problem.
check you are giving correct output for maximum inputs.
hope it helps.
Posted: Fri Jan 21, 2005 9:40 am
by Rocky
YEH....!
I GOT ACC NOW.ACTUALLY IT CAUSE FOR SIMPLE PRECISSION ERROR
WHICH I CAN NOT NOTICE BEFORE.
THANK'S
ROCKY
10509-WA
Posted: Sat Oct 22, 2005 8:08 pm
by tuman
please help me.I dont know why i m getting wrong answer.I thougt a lot a nd could not find anything wrong.please write what's wrong with it.I m very depressed

.Plz help me.Here is the code.
..........
.........
// Code deleted after AC

Posted: Mon Oct 24, 2005 12:03 am
by tuman

Finally i hv made it accepted.
Anyway no help is necessary.Actually it contains bloody precision error.
i misplaced 0.000000001 at the end.But it should be added where its needed to be added.
Its all about rejecting precision error,before adding 0.0000000001
i got wrong answer and then after adding this i get ac.precision error
of this problem is unjustificable ,unless we do it. Tuman
Posted: Fri Jun 15, 2007 8:06 am
by SARKAR
I USED BINARY SEARCH AND LOOKUP TABLE AND GOT ACCEPTED IN .252 SEC.
[/quote]
WA
Posted: Fri Feb 22, 2008 6:29 pm
by theharshest
I am getting WA for following code---
Code: Select all
#include<iostream>
using namespace std;
int main()
{
float n,a,b;
int i;
cin>>n;
while(n!=0)
{
for(i=1;i<=100;i++)
{
if(i*i*i > n)
break;
}
a=i-1;
b=(a+ (n-a*a*a)/(2*a*a + a*a));
printf("%.4f\n",b);
cin>>n;
}
}
please help ....
Re: 10509 - R U Kidding Mr. Feynman?
Posted: Mon Mar 02, 2009 7:23 pm
by vahid sanei
To theharshest
i think you should use EPS
...
i got acc in 0.130 and i use pow() , how can i calculate n^(1/3) in faster method ?
thanks in advance

Re: 10509 - R U Kidding Mr. Feynman?
Posted: Sat Jun 13, 2009 7:48 pm
by yeah
I have read all the posts but still getting Presentation error

I have submitted more than times with different sorts of precision and various new lines formats (no newline->PE,one new line after each output->PE,one new line after each output except the last one->PE

)
I would really appreciate any kind of help
Code: Select all
#include<iostream>
#include <iomanip>
using namespace std;
int main()
{
int a,i;
double n;
double dx,res;
while(cin>>n && n!=0)
{
for(i=1;i<=100;i++)
{
if(i*i*i > n)
break;
}
a=i-1;
dx = (n-a*a*a)/(3*a*a);
res = ((double)a +dx+0.000000001);
cout << setprecision(4) << setiosflags(ios::fixed)<<res<<endl;
}
return 0;
}
Re: 10509 - R U Kidding Mr. Feynman?
Posted: Sat Jun 26, 2010 6:43 am
by seraph
actually, you just missing enter after you print the output
try this for the output :
and you will get AC

Re: 10509 - R U Kidding Mr. Feynman?
Posted: Sat Nov 13, 2010 8:22 am
by Igor9669
all of you try this test:
And you will see where is you mistake!
Re: 10509 - R U Kidding Mr. Feynman?
Posted: Mon Sep 15, 2014 8:09 am
by ducviet321
This is stupid, again!
instead of
should be
Code: Select all
output = a + b;
printf("%.4lf\n", output);
and got AC....