Ad
  • Default User Avatar

    I had the same thing happen. It turns out that number with the dashes was not the number provided by the test. When I was breaking the long arg into individual digits, I was doing (int) n%10 instead of (int) (n%10), which was not giving the desired digits (with some being negative numbers), causing the stack trace later on.

  • Default User Avatar

    I have just tried a few solutions and it worked fine. I don't understand why you had that...

  • Default User Avatar

    No, not my printing. Codewars is probably running a wrong test?
    yes, it's Java

  • Default User Avatar

    OK but is it your printing? The inputs are numbers, not strings. Java?

  • Default User Avatar

    basic tests pass, seeing this with the 'Run Suite'.

  • Default User Avatar

    Yes, it's weird. Basic tests or rando tests?

    For input string: "6834172015468-4-3-92-4"

    Is it your printing?

  • Default User Avatar

    The Suite fails with a following:

    For input string: "6834172015468-4-3-92-4"
    test(ToSmallestTest)

    Hm.... How???? :)