| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 54343 | 张思存 | 不与最大数相同的数字之和 | C++ | Accepted | 0 MS | 244 KB | 433 | 2024-10-27 10:45:35 |
#include<bits/stdc++.h> using namespace std; int main(){ int n, ans = 0; cin >> n; int a[n]; for(int i = 0; i < n; i++){ cin >> a[i]; } int max = 0; for (int i = 0; i < n; i++) { if(max < a[i]){ max = a[i]; } } for(int i = 0; i < n; i++){ if(a[i] == max){ }else{ ans += a[i]; } } cout << ans; return 0; }