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.
Test case 1 failed because I simply got it wrong, long division method: I checked whether the remainder has already been seen before expanding the remainder it out with extra zeros. Thus for example if the remainder is 9 in one instance, and 90 in the next, this would not get flagged as the same and the start of a recurrence, even though it should be.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #26: Reciprocal cycles
You are viewing a single comment's thread. Return to all comments →
Probably rare reason for test Case 1 failure:
Test case 1 failed because I simply got it wrong, long division method: I checked whether the remainder has already been seen before expanding the remainder it out with extra zeros. Thus for example if the remainder is 9 in one instance, and 90 in the next, this would not get flagged as the same and the start of a recurrence, even though it should be.