Ad
  • Default User Avatar

    There might, if I knew the language I might fix it.

  • Custom User Avatar

    I made a similar algorithm to yours and got the same error. The problem was that when I modulo 101^exp, I got the result of 1, which was used as the exponent for the next number.

    This problem happens whenever base^exp ends with .....0x. So modulo cuts the number to the ending digit x, which makes the next steps for that case into 2^(2^1)=2^2-1. Whereas 2^(2^101)=2^(long number which ends with....52) = long number which ends with 6.

    Try changing the algorithm to do something slightly different for these cases.

  • Custom User Avatar

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

  • Custom User Avatar

    4⁰ == 1.

  • Custom User Avatar

    Totally agree. They should change it.

  • Custom User Avatar

    agreed!