提交时间:2026-02-19 14:20:23
运行 ID: 84686
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int a = -100000000000000; int b = 0; int ls[4]; for(int i = 0; i < n; i ++){ int x; cin>>x; if(x > a){ a = x; b = i; } ls[i] = x; } int tot = 0; for(int j = 0; j < n; j ++){ if(j != b){ tot += ls[j]; } } cout<<tot; return 0; }