ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1047. Simple Calculations

For those who got WA#2
Posted by MitRo 27 Jun 2010 08:03
Hi all!

I used Binary Search to solve this problem (because I'm not good at Math) and got AC after WA#2 3 times.

For getting AC, I changed my print line from:

cout << result << endl;
// or print("%f\n", result);

To:

print("%.2f\n", result);

It means you must format your result with 2 precisions after the decimal point, or your result will be something like: 14.99038461538461538461538461538462 (many number after the decimal point).

I hope this would help.
Please reply and notice me if there is something wrong.

MitRo.