Count the number of remainders before next occurrence of ( n + 1 ) ' th ▁ remainder ▁ ' d
' NEW_LINE INDENT count = 0 NEW_LINE rem = ( 10 * rem ) % n NEW_LINE count += 1 NEW_LINE while rem != d : NEW_LINE INDENT rem = ( 10 * rem ) % n NEW_LINE count += 1 NEW_LINE DEDENT return count NEW_LINE DEDENT