HACKERRANK - Filling Jars

https://www.hackerrank.com/challenges/filling-jars