When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

caLLerOP's blog

By caLLerOP, history, 3 years 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

»
3 years 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.