We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #238: Infinite string tour
You are viewing a single comment's thread. Return to all comments →
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.