Ad
  • Custom User Avatar

    Thank you for the translations!

  • Custom User Avatar

    Oh, I see what you mean. I'll add random tests.

    Update: Added the random test cases. Thanks!

  • Custom User Avatar

    It is solvable without the particular math background, but it could possibly be a lot harder without it (some not-too-hard optimizations required).
    What is the second solution you are talking about?
    Thanks.

    Edit: actually, I think the math is required in all languages which are not designed to run fast. I think that it's in the realm for a fast language like C++ though.

  • Custom User Avatar

    All right, the sample test code was missing a semicolon. I fixed it; sorry for the inconvenience.