https://www.docodehere.com/2021/02/hackerrank-solution-of-loop-python.html