Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Could you explain how "12, 88, 816 and even 1180344 (and of course, 2360688 itself)" are also solutions of digPow(46288, 3)? I think you're not understanding what to do, the solution is unique or doesn't exist (in that case you have to return -1).

    Without a stated upper limit on n and k

    n doesn't need a limit, a single value is passed to you (as it is p), you have to work with that, nothing more. k is what you have to find.