Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
833 贺思哲 22不与最大数相同的数字之和 C++ Accepted 0 MS 264 KB 322 2023-04-15 14:48:46

Tests(10/10):


Code:

#include<iostream> using namespace std; int main(){ int n,s[101],max=-1000000,z=0; cin>>n; for(int i=1;i<=n;i++){ cin>>s[i]; if(s[i]>max){ max=s[i]; } } for(int i=1;i<=n;i++){ if(not(s[i]==max)) z+=s[i]; } cout<<z; }