Ad
  • Default User Avatar

    Im a little confused as too what your asking. If n is greater than the sum of its digits raised to the (p + i) power, then the final step of (sum % n) will never return 0, causing the method to return -1.