Ad
  • Custom User Avatar

    Long story short, you shouldn't modify given function signatures :P If you remove throws Exception, then it should work.

    the requirements are "non-negative integer"

    This simply means you will only receive non-negative numbers in tests, and you shouldn't have to worry about other inputs. It should also be safe to assume that numbers won't go past integer's bounds, otherwise that would be a kata issue.

  • Custom User Avatar

    Issue with your code is not the same as KATA issue :/ Java has 8000+ completions, so I'm pretty sure the tests are fine.

    I'm not really familiar with that error message, but maybe you're trying to throw an error where it's not needed? No try-catch blocks should be needed here, as all inputs should be valid.

    If you can't resolve it, try posting your code here, format it properly and mark it as spoiler.