Mohammad Asad Ansari's submission of ATM | CodeChef