Problem: Bottles and Cans (click here to see the original problem statement)

My solution.