Harshit Mahajan's submission of ATM | CodeChef