Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
164736 余承均 22砝码的重量 C++ Accepted 4 MS 272 KB 378 2026-11-07 12:24:23

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int sum = 0; int minw = 10000; // 初始设一个很大的值 for(int i = 1; i <= n; i++) { int x; cin >> x; sum += x; if(x < minw) { minw = x; } } cout << sum - minw << endl; return 0; }