JWP (JW Player) Interview Question

(HackerRank code challenge) Slightly complicated fizzbuzz question