Square root of 1 in mod 1e300 by rolf

def f(x,i):
 if i<300:
  d=10**i
  for z in range(10):
   y=d*z+x
   if y**2%(d*10)==1:f(y,i+1)
 elif`x`[0]in"369":print x
f(input(),3)

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top