HackerRank Triangle Quest in python problem solution - TheCScience