I was going through an easy problem on codechef (https://www.codechef.com/problems/ANUWTA) and I saw these submissions:
[This submission had a time limit exceeded][1][1]: https://i.stack.imgur.com/mVnMr.png
while another similar submission [is the right answer][2] [2]: https://i.stack.imgur.com/4LCEE.png
I do not get why there is 1.5 seconds difference between these two. The initial guess was maybe type casting.
The link to the submissions:
https://www.codechef.com/viewsolution/52161454
https://www.codechef.com/viewsolution/52161477
These are not my submissions.