Project Euler #238: Infinite string tour

  • + 1 comment

    It seems there is a mistake in the question and test cases.

    As per question 'w' is concatentaion of numbers s0, s1, s2, s3. w = 4,1024,11568674,97880....

    s0 = 4 s1 = 1024 s2 = 11568674

    Till s2 is correct but s3 is not correct. As per my calculation s3 which is ((11568674)^5) mod 16710461 = 7343180. But as per number (for w) given in question s3 is a number starting with '97880'. This doesnt seem correct. So test cases are also wrong.