HackerEarth Query multiples problem solution - TheCScience