caLLerOP's blog

By caLLerOP, history, 6 weeks ago, In English

Educational Codeforces Round 99 (Rated for Div. 2), problem: (A) Strange Functions

I submitted this question's solution, and it showed accepted.

But the next day, it shows hacked, but the solution in the editorial and mine is almost similar, so how's mine hacked?

 
 
 
 
  • Vote: I like it
  • -4
  • Vote: I do not like it

»
6 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

I think that problem should have been solved using string, I used math operations to solve it, and it said accepted at first. But in the next day, it was wrong when the test case was something like 99999999999999999999 (a lot of 9s). So someone tried your code and entered the test case with a lot of 9s, and if the result doesn't show up like it's supposed to then your code gets hacked and you don't receive any points for that problem.