Solved AOJ2200.cpp