HackerEarth Help problem solution - TheCScience