Pooja Trivedi's submission of ATM | CodeChef