Shivam's submission of Check Algorithm | CodeChef