大佬球助
查看原帖
大佬球助
1075855
zouyinghan楼主2023/12/16 15:19
#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
	cin>>n;
	for(int j=1; j<=n; ++j) {
		for(int i=1; i<=n; ++i) {
			if(n<10) {
				cout<<"0"<<i;
			} else {
				cout<<i;
			}
		}
		cout<<endl;
	}
	cout<<endl;
	for(int k=1; k<=n; ++k) {
		for(int i=1; i<=n; ++i) {
			for(int j=n-1; j>=1; ++j) {
				cout<<"  ";
			}
			if(i<10) {
				cout<<"0"<<i;
			}
		}
		cout<<endl;
	}
	return 0;
}

#4AC #125TLE

2023/12/16 15:19
加载中...