#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; char a[10][10]; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { a[i][j] = 'A' + (i + j) % n; } } for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cout <<setw(3)<< a[i][j]; } cout << endl; } return 0; } /************************************************************** Problem: 1194 User: wuyichen Language: C++ Result: Accepted Time:11 ms Memory:2072 kb ****************************************************************/