HackerRank Hotel Prices in C++ problem solution - TheCScience