Ad
  • Custom User Avatar

    I'm having the same issue, and using only ints does not help. I've tried doing all the math with longs and converting the final answer to an int and I've tried making it so that each calculation results in an int. I've also tried several other ways of calculating, but I can't seem to get the expected results when there is an integer overflow. This kata needs to be fixed for Java so that either only smaller numbers are used, or so the expected result is a long.

  • Custom User Avatar

    Hi,

    I didn't see your message until now, sorry. Issue confirmed, and solved. That should be good, now. Sorry about that... :/ (a dirty seek&replace that became somewhat "wild"...)

  • Custom User Avatar

    It looks like the solution is caused from integer overflow, so if you do everything using ints you should be fine. However, that may be a problem with the test cases themselves, given that the solution does not equal math.

  • Custom User Avatar

    Hi @ccgrover. Yes, [-1, 10, 8, 9, -2, 3, 1] is bouncy and is longer than [1, -7, -2] . The translator, @Blind4Basics will answer you soon.