答案
2026-07-13 23:08:54
发布于:新疆
0阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,m;
cin >> m >> n;
int cnt = 0;
while(n--){
int x;
cin >> x;
if(x <= m){
m -= x;
}else{
cnt++;
}
}
cout << cnt;
return 0;
} //代码
这里空空如也







有帮助,赞一个