https://slothcoders.blogspot.com/2020/11/for-loop-in-cpp-hackerrank-solution.html