Ad
  • Custom User Avatar

    Remove it. There're no final tests with n this big. If you indeed want to check your solution on this input (it's correct, I suppose), change the n type to long.

  • Custom User Avatar

    I couldn't find such test in Java...

    It seems there's no problem with n being so big even though it's stored as int.