HackerRank Array Mathematics in python problem solution - TheCScience