Solve problem 145 using C++ and Go.
Solve problem 124 using Python.