Solve "Milkshakes" Code Jam problem