| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 151245 | 刘梓含 | 打印三角形 | C++ | Accepted | 5 MS | 272 KB | 371 | 2026-04-11 13:41:03 |
#include<bits/stdc++.h> using namespace std; int main (){ int n; cin >> n; for(int i = n - 1;i >= 1;i--) { cout << " "; } cout << "*" << endl; for(int i = n - 1;i >= 1;i--) { for(int s = 1;s < i;s++) { cout << " "; } for(int d = 1;d <= n * 2 - i * 2 + 1;d++) { cout << "*"; } cout << endl; } return 0; }