diff --git a/72 b/72 new file mode 100755 index 0000000..6c7d607 Binary files /dev/null and b/72 differ diff --git a/72.hi b/72.hi new file mode 100644 index 0000000..828ca9d Binary files /dev/null and b/72.hi differ diff --git a/72.hs b/72.hs new file mode 100644 index 0000000..0ba78d9 --- /dev/null +++ b/72.hs @@ -0,0 +1,6 @@ +import Math.NumberTheory.Primes.Factorisation + +totient :: Integer -> Integer +totient n = foldr (\(p, _) acc -> acc * (p-1) `div` p) n $ factorise n + +main = print $ sum $ map totient [2..1000000] diff --git a/72.o b/72.o new file mode 100644 index 0000000..4e00559 Binary files /dev/null and b/72.o differ