Solve problem 5 with both ruby and go.

ruby seems to run forever.