Submitted with the PyPy3 compiler, not Python3, yet still I got TLE on one case: 499 500(here)
I think that there is nothing to improve! It's not like in knapsack where modifying the order of the fors (range(10**2)/range(10**6) vs range(10**6)/range(10**2)) helps a lot.
Yet there are people who got AC with Python — I could see them in the statistics table.
Please help me out! I've run into this problem before and don't know what to do. Thank you!