Shivam Mahendru's submission of Twisted Sum | CodeChef