HackerRank Day 14: Scope problem solution - TheCScience