AIZU ONLINE JUDGE   Introduction to Programming Iの後半の解答