Shivam Bajaj's submission of Problem6 | CodeChef