diff --git a/Legendre_symbol.py b/Legendre_symbol.py index ae17b32..988b003 100644 --- a/Legendre_symbol.py +++ b/Legendre_symbol.py @@ -6,7 +6,7 @@ def v(a, b): return r1 if abs(r1) < abs(r2) else r2 # Считает значение символа Лежандра def solve(a, p): - stop_i = (p-1)>>1 + 1 + stop_i = (p-1)//2 + 1 cnt = sum(1 for i in range(1, stop_i) if v(a*i, p) < 0) return pow(-1, cnt)