26.py 198 B

1234
  1. # List of cyclic fractions for p < 1000 given on Wikipedia
  2. # Largest repeating cyclic fraction will be p-1
  3. # Thus, solution is 983
  4. # http://en.wikipedia.org/wiki/Cyclic_number#Form_of_cyclic_numbers