HackerEarth Help Fredo problem solution - TheCScience