Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
160780 鸡哥 18删除成绩 C++ Compile Error 0 MS 0 KB 256 2026-09-26 13:45:55

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a[100],n,x; int n; for(int i=1;i<=n;i++){ cin>>a[i]; } cin>>x; for(int i=1;i<=x-1;i++){ cout<<a[i]<<" "; } for(int i=x;i<=n;i++){ cout<<a[i]<<" "; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:6: error: redeclaration of 'int n'
  int n;
      ^
Main.cc:4:13: note: 'int n' previously declared here
  int a[100],n,x;
             ^