### start_code_end's blog

By start_code_end, history, 7 weeks ago,

Hey everyone! I am getting "Time limit exceeded" prompt on a fairly easy question. Here's my code: https://codeforces.com/problemset/submission/1520/115570147. Can somebody point out why is my code exceeding the time limit with suitable corrections? Thanks in advance!

• -4

 » 7 weeks ago, # |   +10 First of all $n \le 10^9$. And you are looping from $1$ to $10^9$. This is already $10^9$ operations which is already too much. You have to do something smarter then this naive bruteforce.
•  » » 7 weeks ago, # ^ |   0 Thanks!