Simple C++ solution for 79