Good problem. Use only integer calculations

I tried to solve with some float precisions but it was always WA. Then it was written using only integer calculations and AC.

Re: Good problem. Use only integer calculations

I got AC using doubles

Good problem. Use only integer calculations

But integer solution really nice ;)

Re: Good problem. Use only integer calculations

Posted by

svr 16 Aug 2010 14:45

I think that integer method is nice

because it mathematically easy proved

Float method has only timus-Ac verification and

there for less nice.

I tried to find regorious analysis of some

float algo based on computer float system theory but it is rather difficult.

Re: Good problem. Use only integer calculations

I totally agree - very interesting problem with integer solution.