Problem : <title>
NOTE: Spoilers below!
Idea:
if 10 is a primitive root mod p, then cycle is p-1. start at 997 and check.
resources:
http://en.wikipedia.org/wiki/Repeating_decimal http://primes.utm.edu/lists/small/1000.txt http://dbfin.com/2012/04/primitive-roots-modulo-the-first-1000-numbers/
--
The solution runs in and returns the answer .