Gautam Khanna's submission of ATM | CodeChef