Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
104188 | 夏梓瑞 | 22不与最大数相同的数字之和 | C++ | Accepted | 1 MS | 272 KB | 573 | 2025-01-04 14:57:20 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min()\fabs() #include<ctime> #include<cstdlib> using namespace std; long long m=-1000000; int main(){ int n,sum=0; cin>>n; int a[n+1]; for(int i=1;i<=n;i++){ cin>>a[i]; if(m<a[i]) m=a[i]; } for(int i=1;i<=n;i++){ if(a[i]!=m) sum+=a[i]; } cout<<sum; return 0; }