Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
4557 | D班-汤依宁 | 买不买 | C++ | 通过 | 100 | 0 MS | 260 KB | 292 | 2025-01-12 17:12:16 |
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c,sum=0,max=0; cin>>a; for(b=0;b<a;b++) { cin>>c; sum+=c; if(c>max) { max=c; } } if(sum>100) { cout<<"Yes"<<endl; sum=sum-max; } else { cout<<"No"<<endl; } cout<<sum; }