This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
// n=5 i=1 j<=5
cin >> n; // 1~13
int k = 0;
for (int i = 1; i <= n; i++) { // 枚举每一行
//打印空格
for (int j = 1; j <= 2 * i - 2; j++)
printf(" ");
for (int j = 1; j <= n + 1 - i; j++) //枚举每一列
printf("%02d", ++k); //用0补全不足2位的数字,加上前导0
// printf("\n");
// cout << endl;
puts("");
}
return 0;