Hi everyone,
I have submitted a solution to the recent Codeforces Round 1045 Div 2 problem B (which was Add 0 or K) and my solution looks
similar to the editorial solution 2 yet my solution is giving TLE and Editorial code is getting Accepted can anyone guide me.
Link to my submission : https://codeforces.me/contest/2134/submission/335714240
update : orz qwertylkjhg pointed out the error and now it is Accepted.








You should remove 9 from x. In a test case, where k is divisible by 210 and not divisible by 9, if some a[i] is not divisible by 3, while loop will run infinitely.