Update PAT 1001.cpp