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 1593. Square Country. Version 2

TLE 54, what is wrong with Java?
Posted by Hikmat Ahmedov 3 Mar 2013 16:50
I followed the algorithm of luckysundog which is posted in this forum and solved it C# and C++.
The same code in C# and C++ gives AC, but in Java it gives Time Limit Exceeded in test 45.
I improved the code to run faster but now it gives TLE 54.
I tested the code against worst case of 1000000000000037, which is a prime number. And execution time for this test was 138 milliseconds which is obviously less than 1000 (1 second).
For prime 10000000000000061, it takes 185 milliseconds.
Does anybody know what test 54 is?
Did anybody solve this problem in Java?
Can you please send me the solution to hazorman@gmail.com
Thanks,