提交时间:2026-06-18 06:04:53

运行 ID: 91888

#include <bits/stdc++.h> using namespace std ; const int N = 110 ; int n , a[N][N] ; int main() { cin >> n ; for(int i = 1 ; i <= n ; i++ ) for(int j = 1 ; j <= n ; j++ ) cin >> a[i][j] ; for(int i = 1 ; i <= n ; i++ ) { cout << a[i][n] << ' ' ; for(int j = 2 ; j < n ; j++) cout << a[i][j] << ' ' ; cout << a[i][1] << endl ; } return 0 ; }