|
|
вернуться в форумhint about WA#11 Послано melkiy 1 мар 2009 09:58 People, __int64 not needed! I quickened my program from 0.31 to 0.15 when returned __int64 to int (if that was not a fluctuation). Listen here. During one meal Ivan can save about 2*10^6/3 ~ 666667 rub. This is maximum increment of saved money. So at maximum the saved sum will be 2*10^9 + 666667, which is much less than 2^31-1. My trouble (and most likely yours too) was connected with that i checked if saved sum is strictly greater than n fogetting of the fractional part. This is the case when ( integer part of saved money == n) BUT ( integer part == n AND fractional part > 0) |
|
|