Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
106520 金昱帆 22砝码的重量 C++ Compile Error 0 MS 0 KB 354 2025-01-16 12:18:39

Tests(0/0):


Code:

#include<bits/stdC++.h> using namespace std; int main() { int n; cin >> n; int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } int max = a[0]; for (int i = 1; i < n; i++) { if (a[i] < max) { max = a[i]; } } float sum = 0; for (int i = 0; i < n; i++) { sum = sum + a[i]; } cout << sum - max; return 0; }


Run Info:

Main.cc:1:24: fatal error: bits/stdC++.h: No such file or directory
 #include
                        ^
compilation terminated.