Solve problem 97

This commit is contained in:
2021-04-19 11:55:37 -04:00
parent b7f1011b54
commit 42907eeaba
3 changed files with 49 additions and 1 deletions

16
python/e097.py Normal file
View File

@@ -0,0 +1,16 @@
def euler_097():
mod = 10**10 # we want the last ten digits
s = 1
for _ in range(7830457):
s = (s * 2) % mod
s = (28433 * s) % mod
s = s + 1
return s
if __name__ == "__main__":
solution = euler_097()
print("e097.py: " + str(solution))
assert(solution == 8739992577)