WA求调
查看原帖
WA求调
741937
harryzhou楼主2024/12/3 12:43
#include <bits/stdc++.h>
using namespace std;

int main(){
	int n;
	cin >> n;
	int s = 'A';
	for(int i = 1; i <= n; i++){
		s += i - 1;
		bool f = 0;
		for(int j = 1; j <= n; j++){
			if(s > 'Z'){
				s = char('A');
				f = 1;
			}
			cout << char(s);
			s += 1;
		}cout << endl;
		if(f)continue;
		s -= (i + n - 1);
	}
	return 0;
} 
2024/12/3 12:43
加载中...