Mangesh Panchal's submission of ATM | CodeChef