Hong Kong Olympiad in Informatics [HKOI] 2003

Wrong Solution 8

This program fails for the case N = 1 since the only line in the output file should be terminated with a new-line character.