Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
113201 李朋秦 18成绩查找 C++ Compile Error 0 MS 0 KB 1008 2025-03-15 13:57:58

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;#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(){ int b=0,a,c[100],d,e; cin>>a; for(int i=0;i<a;i++){ cin>>c[i]; }cin>>d>>e; c[d-1]=e; for(int j=0;j<a;j++){ if(c[j]>100){ c[j-1]=e; } cout<<c[j]<<" "; } return 0; } int main(){ int b=0,a,c[100],d,e; cin>>a; for(int i=0;i<a;i++){ cin>>c[i]; }cin>>d>>e; c[d-1]=e; for(int j=0;j<a;j++){ if(c[j]>100){ c[j-1]=e; } cout<<c[j]<<" "; } return 0; }


Run Info:

Main.cc:6:21: error: stray '#' in program
 using namespace std;#include  // cin\cout\endl
                     ^
Main.cc:6:22: error: 'include' does not name a type
 using namespace std;#include  // cin\cout\endl
                      ^
Main.cc: In function 'int main()':
Main.cc:13:9: warning: unused variable 'b' [-Wunused-variable]
     int b=0,a,c[100],d,e;
         ^
Main.cc: In function 'int main()':
Main.cc:27:5: error: redefinition of 'int main()'
 int main(){
     ^
Main.cc:12:5: note: 'int main()' previously defined here
 int main(){
     ^
Main.cc:28:9: warning: unused variable 'b' [-Wunused-variable]
     int b=0,a,c[100],d,e;
         ^