Page 2 of 2
Re: 438 - The Circumference of the Circle
Posted: Wed Apr 02, 2008 5:30 pm
by RC's
of course i define PI as what the problem states :
Here is my code, i don't know what's wrong... it makes me really confused..
Re: 438 - The Circumference of the Circle
Posted: Sun Apr 06, 2008 7:20 am
by Obaida
You Made a bad mistake,
What about "long double and scanf("%lf.....)
I think it should be scanf("%Lf......)
Remove your code after Ac...
Re: 438 - The Circumference of the Circle
Posted: Sun Apr 06, 2008 6:09 pm
by RC's
ic2.. you are right, it was my mistake... but when i ran it on MSVC it produced right answers.. i don't know if gcc doesn't...
it's compiler issue i think.. by the way, thanks..
Re: 438 - The Circumference of the Circle
Posted: Sun Apr 06, 2008 9:09 pm
by Jan
I don't know which version of MSVC you are using. I use MSVC 6.0 which doesn't support (the actual!!) 'long double'. You can use 'long double' though. But it acts as ordinary 'double'. So, '%lf' works for both 'double' and 'long double' in MSVC 6.0 (since both are same here).
Re: 438 - The Circumference of the Circle
Posted: Mon Apr 07, 2008 5:47 pm
by RC's
I use MSVC 9.0 Express Edition... When I debug here, it produced correct answers, just the same answers as I used %lf for the input...
But i don't know why when I changed %lf to %Lf it got AC.. I didn't change any other code..
Re: 438 - The Circumference of the Circle
Posted: Wed Nov 12, 2008 6:25 am
by blackSajia
Hello How r u everybody. I am getting wrong answer in 438. The code given bellow :
Plz help me where the error occured and give some I/O data.

Re: 438 - The Circumference of the Circle
Posted: Wed Nov 12, 2008 9:28 am
by Obaida
you should use long double.

Re: 438 - The Circumference of the Circle
Posted: Sun Jun 28, 2009 7:30 am
by lnr
Is there any condition for a point to be on the circle?
I am trying to solve this problem using this equation.
x*x+y*y+2*f*x+2*g*y+c=0;
Re: 438 - The Circumference of the Circle
Posted: Thu Sep 02, 2010 11:03 pm
by arifcsecu
i got 11 times WA using x^2+y^2+gx+fy+c=0 equation method.
At last i got accepted using Sunny methods.
Thanks Sunny Bhi..
Re: 438 - The Circumference of the Circle
Posted: Thu Nov 24, 2011 4:32 pm
by avatar
i was trying to use the following algorithm but it gave me WA:
1.i considered the given three points to be the vertex of a triangle
2.then i found the centroid
3.so actually that is the center of the circle surrounding the triangle
4.then from the centroid i found distance of any vertex which is actually the radius
5.then i applied the formula for circumference
another thing i could not use long double
if i use it answer is always -2.0000000
but why?????????
can anyone have the idea please....................

Re: 438 - The Circumference of the Circle
Posted: Tue Jan 01, 2013 10:09 pm
by alimbubt
Input:
Code: Select all
-1.0 -1.0 -1.0 7.0 5.0 12.0
0.0 -50.0 50.0 50.0 0.0 0.0
2.0 56.0 41.0 28.0 23.0 91.0
Output:
Re: 438 - The Circumference of the Circle
Posted: Sat May 18, 2013 6:02 pm
by triplemzim
Here is my code... I got 7 times wa why?? Plz help.
thanks brianfry....

Re: 438 - The Circumference of the Circle
Posted: Tue May 21, 2013 4:19 am
by brianfry713
Print a newline after each value.
Re: 438 - The Circumference of the Circle
Posted: Fri Jul 26, 2013 12:16 am
by triplemzim
brianfry713 wrote:Print a newline after each value.
thanks brianfry... got ac
Re: 438 - The Circumference of the Circle
Posted: Wed Feb 10, 2016 3:21 am
by Savage COOKS
Hey everyone, first post ever here. Problem 438 seemed pretty straight forward with no crazy cases. The program was run with critical input, and any other input that could be thought of from the debug page. Everything comes back correct. An <<endl was put at the end of each printout, to make sure there was line break between numbers. An extra <<endl was added here or there to try to see if more line breaks were needed, all resulting in WA. Once again, the numerics do match all the data that has been plugged into the debugger. Anyone care to shed some light on this program? I am hoping it is something stupidly silly.
Thanks!