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 ?
|
What is the largest prime factor of the number 600851475143 ?
|
||||||
"""
|
"""
|
||||||
target = 600851475143
|
ans = 600851475143
|
||||||
ans = 2
|
factor = 2
|
||||||
while ans * ans < target:
|
while factor * factor < ans:
|
||||||
while target % ans == 0:
|
while ans % factor == 0:
|
||||||
target = target // ans
|
ans = ans // factor
|
||||||
ans += 1
|
factor += 1
|
||||||
|
|
||||||
return target
|
return ans
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user