Ajay Sharma's submission of ATM | CodeChef