CodeFoeces-34B

题目

原题链接:B. Sale

题意

有n台电视待售,主角最多拿m台。问最多能赚多钱。价格小于0代表赚。

代码

#include
using namespace std;
int main() {
    int n,m,s[100];
    scanf("%d%d",&n,&m);
    for(int i=0; i

你可能感兴趣的:(CodeFoeces-34B)