Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
2106 | A班-何泓霏 | 买不买 | C++ | 解答错误 | 0 | 0 MS | 260 KB | 322 | 2024-12-14 11:01:17 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int a[n]; int max=0; int temp=0; for(int i=0;i<n;i++) { cin>>a[i]; temp+=a[i]; if(max<a[i]) { max=a[i]; } } if(temp<=100) { cout<<"No"<<temp; } else { cout<<"Yes"<<endl<<temp; } return 0; }