Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
122793 李昊宇 拐角方阵 C++ Compile Error 0 MS 0 KB 237 2025-06-21 13:45:52

Tests(0/0):


Code:

using namespace std; int main(){ int n,a[20][20],c=0; cin>>n; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(i<j){ cout<<i+1<<' '; } else{ cout<<j+1<<' '; } } cout<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:1: error: 'cin' was not declared in this scope
 cin>>n; 
 ^
Main.cc:8:4: error: 'cout' was not declared in this scope
    cout<