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.