ENG
RUS
Timus 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
1828
. Approximation by a Progression
wa11
Posted by
waterlink
19 Mar 2011 17:42
is it a some especial test?
*
Posted by
Maxim Dvoynishnikov (Dnipropetrovsk NU)
25 Mar 2011 02:49
I think it's any test with N>1300.
Re: wa11
Posted by
IgorKoval(from Pskov)
8 Oct 2011 01:47
YES!
if you use formula n*(n-1)*(2*n-1)/6 and n is long=> overflow when n > 1300!
use this:
long long n; //!!!
Edited by author 08.10.2011 01:48
© 2000–2024
Timus Online Judge Team
. All rights reserved.