Solve problem 80 using Erlang.