File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed
Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ def is_prime(n: int) -> int:
8989 def f (a , t , n ):
9090 x = pow (a , t , n )
9191 nt = n - 1
92- while t != nt and x not in (x , nt ):
92+ while t != nt and x not in (1 , nt ):
9393 x = pow (x , 2 , n )
9494 t <<= 1
9595
@@ -309,7 +309,7 @@ def check(mid:int):
309309 return left if return_left else right
310310
311311
312- from typing_extensions import Self
312+ from typing import Self
313313
314314
315315def mod_add (a : int , b : int , mod : int ) -> int :
@@ -1221,7 +1221,7 @@ class HeapBase:
12211221 def __init__ (
12221222 self ,
12231223 arr : list [Any ] = [],
1224- key : Callable [Any , Any ] = _keys_for_heapq ,
1224+ key : Callable [[ Any ] , Any ] = _keys_for_heapq ,
12251225 ) -> None :
12261226 """arrはソート済みが前提です"""
12271227 self .key : Callable [Any , Any ] = key
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class HeapBase:
1919 def __init__ (
2020 self ,
2121 arr : list [Any ] = [],
22- key : Callable [Any , Any ] = _keys_for_heapq ,
22+ key : Callable [[ Any ] , Any ] = _keys_for_heapq ,
2323 ) -> None :
2424 """arrはソート済みが前提です"""
2525 self .key : Callable [Any , Any ] = key
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ def is_prime(n: int) -> int:
1212 def f (a , t , n ):
1313 x = pow (a , t , n )
1414 nt = n - 1
15- while t != nt and x not in (x , nt ):
15+ while t != nt and x not in (1 , nt ):
1616 x = pow (x , 2 , n )
1717 t <<= 1
1818
Original file line number Diff line number Diff line change 1- from typing_extensions import Self
1+ from typing import Self
22
33
44def mod_add (a : int , b : int , mod : int ) -> int :
Original file line number Diff line number Diff line change 11#! /bin/bash
22
33./merge_file.bash
4- ruff check
4+ ruff check --exclude tests --exclude libs/import.py --exclude code/main.py
55ruff format
66git add -A
You can’t perform that action at this time.
0 commit comments