【无标题】

Coins
There are N kinds of coins. Each kind of coins has a value V and a weight W. Tony wants to go traveling. Unfortunately, he can only carry coins of which the total weight is not greater than K. How much total value of coins can he carry at most?
First line: two positive integers N (N <= 100) and K (K <= 1000). Next N lines: the i-th line two positive integers V and W (V,W <= 1000) indicating the value and the weight of the i-th coin. One integer indicating the total

【无标题】最先出现在Python成神之路

版权声明:
作者:congcong
链接:https://www.techfm.club/p/19749.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>