Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
119781 | 胡海峰老师 | 22砝码的重量 | C++ | Accepted | 1 MS | 276 KB | 302 | 2025-05-18 19:52:51 |
#include <iostream> using namespace std; int main(){ int a[1009]; int n,tot=0;; cin>>n; for(int i=0;i<n;i++) { cin>>a[i]; tot += a[i]; } int minx = a[0]; for(int i=0;i<n;i++) { if ( a[i]<minx) minx = a[i]; } cout<< tot-minx; return 0; }