HackerEarth Interesting Coins problem solution - TheCScience