Rohit's submission of Check Algorithm | CodeChef