Problem 5 solved in Haskell.
Problem 5 solved in Python.