Kapil Agarwal's submission of ATM | CodeChef