Carlos Joa's submission of ATM | CodeChef