Devesh Agarwal's submission of Q1 | CodeChef