Google Code Jam Problem - Store Credit