Hackerrank - Looping and Skipping

Problem Statement
A description of the problem can be found on Hackerrank.

Solution

All solutions are also available on my GitHub.