Problem 010, C++