Hi, during today's Div.3 contest, I solved E2 by using the similar approach to E1, checking all the k from 2 to 3000 such that 1+k+k^2+...+k^r==n, and only adding some special O(1) checks for cases when r = 2, 3, 4, 5. I think the solutions is probably not correct but I could not find a hack for it. I am looking for a hack that can make the code WA or TLE. The submission is the following: 212679414. Any help would be appreciated, thanks in advance!
Update: I did not get the E2 hack, but I did get a B hack...