Dhruv Gheewala's submission of ATM | CodeChef