Consistency formatting
This commit is contained in:
parent
5c7cec373c
commit
da28ecdd09
@ -19,14 +19,14 @@ def compute():
|
||||
|
||||
What is the largest prime factor of the number 600851475143 ?
|
||||
"""
|
||||
target = 600851475143
|
||||
ans = 2
|
||||
while ans * ans < target:
|
||||
while target % ans == 0:
|
||||
target = target // ans
|
||||
ans += 1
|
||||
ans = 600851475143
|
||||
factor = 2
|
||||
while factor * factor < ans:
|
||||
while ans % factor == 0:
|
||||
ans = ans // factor
|
||||
factor += 1
|
||||
|
||||
return target
|
||||
return ans
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
x
Reference in New Issue
Block a user