HackerEarth Game Of Strengths problem solution - TheCScience