https://slothcoders.blogspot.com/2020/09/python-loops-hackerrank-solution.html