Solve problem 72 using C++/Go/Python/Ruby.