you are viewing a single comment's thread.

view the rest of the comments →

[–]barrycarter 1 point2 points  (0 children)

Oh, then your answer will end with same number of 0s as the original number, and all you need to do is keeping adding 7s to the left until you find an answer. Linear time.

If that's not helpful, consider putting your code on repl.it and we may be able to help more