Ad
  • Default User Avatar

    It's not correct. Overflow error (int i). For example - expandedForm(Integer.MAX_VALUE): "727379968 + 488372224 + 194313216 + 589934592 + 100000000 + 40000000 + 7000000 + 400000 + 80000 + 3000 + 600 + 40 + 7"
    Change varable "i, rem" to "long" type in the function body.