fork download
  1. def is_solution(n):
  2. for i in range(5):
  3. if n % 5 != 1:
  4. return False
  5. n = 4 * (n // 5)
  6. return n % 5 == 1
  7.  
  8. for n in xrange(100000):
  9. if is_solution(n):
  10. print n
  11.  
Success #stdin #stdout 0.17s 6356KB
stdin
Standard input is empty
stdout
15621
31246
46871
62496
78121
93746