Page 3 of 3

### WHATS WRONG 10509???

Posted: Sun Jan 16, 2005 12:03 pm
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
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
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
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
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.

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

I USED BINARY SEARCH AND LOOKUP TABLE AND GOT ACCEPTED IN .252 SEC.
[/quote]

### WA

Posted: Fri Feb 22, 2008 6:29 pm
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;
}
}``````

### Re: 10509 - R U Kidding Mr. Feynman?

Posted: Mon Mar 02, 2009 7:23 pm
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 ?

### Re: 10509 - R U Kidding Mr. Feynman?

Posted: Sat Jun 13, 2009 7:48 pm
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
actually, you just missing enter after you print the output
try this for the output :

Code: Select all

``printf("%.4lf\n",res);``
and you will get AC

### Re: 10509 - R U Kidding Mr. Feynman?

Posted: Sat Nov 13, 2010 8:22 am
all of you try this test:

Code: Select all

``````1000000.0
0
``````
And you will see where is you mistake!

### Re: 10509 - R U Kidding Mr. Feynman?

Posted: Mon Sep 15, 2014 8:09 am
This is stupid, again!

``printf("%.4I64d\n", a + b);``
``````output = a + b;