Hackerrank Challenges - Birthday chocolate

(CM) A verbose and pudgy solution.