P3092 [USACO13NOV] No Change G
题目描述
Farmer John is at the market to purchase supplies for his farm. He has in his pocket K coins (1
输入格式
无
输出格式
无
说明/提示
FJ has 3 coins of values 12, 15, and 10. He must make purchases in sequence of value 6, 3, 3, 2, 3, and 7.
FJ spends his 10-unit coin on the first two purchases, then the 15-unit coin on the remaining purchases. This leaves him with the 12-unit coin.