Badrinath Kulkarni's submission of Problem 3 | CodeChef