HackerRank Day 3: Throw problem solution - TheCScience