| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 318108 | gsh7013020 | 星号三角阵(三) T2 | C++ | 通过 | 5 MS | 732 KB | 902 | 2026-04-19 16:37:47 |
#include <bits/stdc++.h> using namespace std; template<typename U, typename V>bool cmin(U &x, const V &y) { return y < x ? x = y, 1 : 0; } template<typename U, typename V>bool cmax(U &x, const V &y) { return y > x ? x = y, 1 : 0; } //不听老人言,磕到甲沟炎 using ll = long long; using pii = pair<int, int>; using ull = unsigned long long; #define fi first #define ls i<<1 #define rs i<<1|1 #define fls i>>1 #define frs i-1>>1 #define endl '\n' #define se second #define int ll const int N = 5e4 + 10, inf = 0x3f3f3f3f; void solve() { int n; cin >> n; for (int i = 1; i <= n; i++) { for (int j = 2; j <= i; j++) { cout << " "; } for (int j = i;j <= n;j++){ cout <<"*"; } cout << endl; } } signed main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); int T = 1; //cin >> T; while (T--) { solve(); } return 0; }