We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cecf43d commit 21977f7Copy full SHA for 21977f7
project_euler/problem_003/sol1.py
@@ -92,8 +92,8 @@ def solution(n: int = 600851475143) -> int:
92
return n
93
for i in range(3, int(math.sqrt(n)) + 1, 2):
94
if n % i == 0:
95
- if isprime(n / i):
96
- max_number = n / i
+ if isprime(n // i):
+ max_number = n // i
97
break
98
elif isprime(i):
99
max_number = i
project_euler/problem_003/sol3.py
@@ -57,7 +57,7 @@ def solution(n: int = 600851475143) -> int:
57
i += 1
58
ans = i
59
while n % i == 0:
60
- n = n / i
+ n = n // i
61
62
return int(ans)
63
0 commit comments