1 条题解
-
1
#include <iostream> using namespace std; int main() { int n, x; cin >> n; char a[n + 1][n + 1]; for (int i = 1; i <= n; i++) { x = i; for (int j = 1; j <= n; j++) { a[i][j] = 64 + x; if (x < n) { x++; } else { x = 1; } } } for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { cout << " " << a[i][j]; } cout << endl; } return 0; }
- 1
信息
- ID
- 194
- 时间
- 1000ms
- 内存
- 16MiB
- 难度
- 2
- 标签
- 递交数
- 66
- 已通过
- 39
- 上传者