Update problem_1001.cpp