Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
93924 | 只因你太美(Ikun 真爱粉) | 22不与最大数相同的数字之和 | C++ | Accepted | 1 MS | 272 KB | 494 | 2024-10-19 15:30:08 |
#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() #include<string> using namespace std; int main(){ int n,m=0,ma=0; cin>>n; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; m=max(m,a[i]); } for(int i=0;i<n;i++){ if(m!=a[i]) ma+=a[i]; }cout<<ma; return 0; }