GCJ Round1 Problem1 C++ code.