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