Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
129195 李明秦 矩阵右移动 C++ Compile Error 0 MS 0 KB 401 2025-08-22 15:30:49

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int a[10][10],b[10][10]; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin>>a[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ b[i][(jm)%n]=a[i][j;] } } for(int i=0;i<n;i++){ cout<<b[i][0]; for(int j=0;j<n;j++){ cout<<" "<<b[i][j]; } cout<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:15:10: error: 'jm' was not declared in this scope
    b[i][(jm)%n]=a[i][j;]
          ^
Main.cc:15:23: error: expected ']' before ';' token
    b[i][(jm)%n]=a[i][j;]
                       ^
Main.cc:15:24: error: expected primary-expression before ']' token
    b[i][(jm)%n]=a[i][j;]
                        ^