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 1402. Cocktails

why
Posted by waterlink 11 Apr 2011 00:51
why is solution with long double not working, long double must have 18 digits according to ISO c++, which must be enough to solve this problem

i've calculated everything using g++ and long double, and formed a constant and got AC, which means that system compiler is bad..
Re: why
Posted by S.77 6 Aug 2011 02:57
The solution for the hardest case is the number "138879579704209680000" which has 21 decimal digits.
You are just a lucky guy :) Maybe, because of its terminating zeroes, who knows.