Hi everybody.
I have a question. I tried to solve the problem A.123-sequence but each time it got "Time Limit exceeded on test 18". even I submitted the answer of one of my friends (ATofighi) that got "Accepted" to see that does the compiler do right? but it got "Time limit exceeded on test 18", too!!!!now I add the link of all the submissions below.
http://codeforces.net/contest/52/submission/12923012
http://codeforces.net/contest/52/submission/12923040
http://codeforces.net/contest/52/submission/12923066
http://codeforces.net/contest/52/submission/12923078
http://codeforces.net/contest/52/submission/12923091
http://codeforces.net/contest/52/submission/12923108
and these links are the links of my friend and my submissions(my friend got "Accepted" and when I submitted the same code it get "Time limit exceeded on test 18")
http://codeforces.net/contest/52/submission/4798391 "Accepted"
http://codeforces.net/contest/52/submission/12923117 "Time limit exceeded on test 18"
http://codeforces.net/contest/52/submission/4798427 "Accepted"
http://codeforces.net/contest/52/submission/12923121 "Time limit exceeded on test 18"
http://codeforces.net/contest/52/submission/4798425 "Accepted"
http://codeforces.net/contest/52/submission/12923130 "Time limit exceeded on test 18"
Thank you so much for your help.
UPD:Thank slycelote so much for his/her help .finally I get "Accepted".
http://codeforces.net/contest/52/submission/12957204
UPD2:If you have same problems I suggest that see this post too.It can be helpful for you.
Codeforces servers were upgraded some time between 2013 and now. Running time for old programs is calculated in this way to account for faster servers:
But it's obviously not a precise method, and also compilers have been upgraded since then. So old programs may change from AC to TL or vice versa.
As for why you get a TL — probably because of inefficient I/O. Use this:
Your right but if you see the runnig time of my friend's code, it's 592 ms and if you multiply it by 2 it get 1184 ms but my running time is 2000 ms and I get "time limit" . Why does it happen?? How do you think?
Compilers changed, I/O became slower.