Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
104680 汤奕硕 矩阵右移动 C++ Compile Error 0 MS 0 KB 493 2025-01-07 19:46:09

Tests(0/0):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int m, n; cin >> m >> n; int a[n][n]; for(int i = 0; i < n; ++i){ for(int j = 0; j < n; ++j){ cin >> a[i][j]; } } m = m % n; for(int i = 0; i < n; ++i){ for(int j = m; j < n; j++){ cout << a[i][j] << ' '; } for(int j = 0; j < n - m) cout << a[i][j] << ' '; cout << '\n'; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:21:33: error: expected ';' before ')' token
         for(int j = 0; j < n - m)
                                 ^