Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
131614 郝王骏程 22不与最大数相同的数字之和 C++ Compile Error 0 MS 0 KB 497 2025-09-29 19:46:25

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ longlong a[101],c=-1000001,n,x; cin>>n; for(int i=0;i<=n;i++){ cin>>a[i]; if(c<a[i]) c=a; } for(int i=0;i<=n;i++){ x+=a[i]; } cout<<x-c; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:5: error: 'longlong' was not declared in this scope
     longlong a[101],c=-1000001,n,x;
     ^
Main.cc:9:10: error: 'n' was not declared in this scope
     cin>>n;
          ^
Main.cc:11:14: error: 'a' was not declared in this scope
         cin>>a[i];
              ^
Main.cc:12:12: error: 'c' was not declared in this scope
         if(c