【无标题】
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成神之路。
共有 0 条评论