I tried solving problem 96B - Lucky Numbers (easy) and it gave me very strange TLE.
My submission 207541848 got TLE at n=10^9, but the same code passes the same test cases on the codeforces custom test compiler with a time of 1300ms (approximated).
As the time limit is 2second, Why am i getting TLE on main test?
Now the rest of the solution is right and fits under the time limit. I just made a special case with n=10^9 and passed the main test. 207553081
Please help me figuring out what's happening wrong.