ILOVA
Dastur kodi:
Ps: Biz bu kodlarni python dasturlash tilida yozdik.
import math
def f(x, n):
return (x * x + 1) % n def
loyiha_ish(n):
x = 2 y =
2
boluvchi = 1
i = 0
while boluvchi == 1:
x = f(x, n) y =
f(f(y, n), n)
print(f"x({i}) = {x}")
print(f"y({i}) = {y}")
i += 1
boluvchi = math.gcd(abs(x - y), n)
print(f"EKUB(|x-y|,n)={boluvchi}") if
boluvchi == n:
return None
else:
return [boluvchi, n // boluvchi]
n =
int("3521965691682498349894156297871351510003392837134480208222044"