From 36416059826a5bafd351100b814c27e338a7af77 Mon Sep 17 00:00:00 2001 From: serr Date: Fri, 10 Jan 2025 22:03:53 +0300 Subject: [PATCH] _ --- Legendre_symbol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)