Solve e700 because I have looked at it a while ago and it is easy.
This commit is contained in:
16
python/e700.py
Normal file
16
python/e700.py
Normal file
@@ -0,0 +1,16 @@
|
||||
def euler_700():
|
||||
mod = 4503599627370517
|
||||
mul = 1504170715041707
|
||||
result = mul
|
||||
while mul > 1:
|
||||
while mod > mul:
|
||||
mod = mod % mul
|
||||
mul -= mod
|
||||
result += mul
|
||||
return result
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
solution = euler_700()
|
||||
print("e700.py: " + str(solution))
|
||||
assert solution == 1517926517777556
|
||||
Reference in New Issue
Block a user