Linh Nguyen's submission of Problem 8 | CodeChef