Solve AOJ2503