Priyanshu Tiwari's submission of ATM | CodeChef