Devansh Bajpai's submission of ATM | CodeChef