Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
156044 孔声豪 打印三角形 C++ Accepted 5 MS 272 KB 274 2026-06-20 11:10:14

Tests(15/15):


Code:

#include <bits/stdc++.h> using namespace std; int main(){ int n,h,l,k; cin>>n; for(h=1;h<=n;h++){ for(k=1;k<=n-h;k++){ cout<<' '; } for(l=h*2-1;l>=1;l--){ cout<<'*'; } cout<<endl; } return 0; }