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
1209
. 1, 10, 100, 1000...
Different Solution
Posted by
Jobed
28 Mar 2014 15:47
long n=2*(value-1);
long sqr=(long) Math.floor(Math.sqrt(n));
if((sqr*(sqr+1))==n)
print(1);
else
print(0);
Edited by author 28.03.2014 15:49
© 2000–2024
Timus Online Judge Team
. All rights reserved.