Hey Mitko, very helpful video, can you please share how can someone practice in order to perform well in the contests as well as improve their problem solving skills.
Actually, I just went to the biggest number I can comfortably iterate to without TLE. There are 10^4 test cases, and I can go up to the 10^7 iterations without a problem. But I decided to lower the number, because of the fact that there won't be many big numbers in a row that give N (if they were to be, there would probably be smaller consecutive numbers with the same count that all divide N). Apparently, the editorial just takes advantage of the divisibility and lowers it down to log(max N).