HackerEarth Profits by cars problem solution - TheCScience