Solve problem 73 using Erlang.