Files
python/RuMenJingDian/LiTi/P_2_3.cpp
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

23 lines
488 B
C++

#include <bits/stdc++.h>
using namespace std;
int main() {
//倒三角形
ios::sync_with_stdio(false); //读入输出优化的强迫症
int n;
cin >> n;
int i, j;
for (i = 1; i <= n; i++) {
//打印空格
for (j = 1; j <= (i - 1); j++) {
cout << " ";
}
//打印#
for (j = 1; j <= (2 * (n - i + 1) - 1); j++) {
cout << "#";
}
cout << endl;
}
return 0;
}