HackerEarth The Substring Game! problem solution - TheCScience