提交时间:2025-01-11 11:05:35
运行 ID: 4348
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int a[n]; int temp = 0; int max = 0; for(int i = 1;i <= n;i++) { cin>>a[i]; temp += a[i]; if(max < a[i]) { max = a[i]; } } if(temp > 100) { cout<<"Yes"<<endl; cout<<temp - max<<endl; } else { cout<<"No"<<endl; cout<<temp<<endl; } return 0; }