Skip to content

Commit

Permalink
add euler072 solution
Browse files Browse the repository at this point in the history
  • Loading branch information
kailanefelix committed Nov 28, 2021
1 parent 542b46b commit 7f51922
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions euler0XX/euler072.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from euler0xx.numbertools import phi

total = 0
for n in range(2, 1_000_001):
total = total + phi(n)
print(total)

# parallel
from multiprocessing import Pool

with Pool() as p:
total = sum(p.imap_unordered(phi, range(2, 1_000_001)))
print(total)

0 comments on commit 7f51922

Please sign in to comment.