| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 156047 | 孔声豪 | 打印菱形 | C++ | Wrong Answer | 1 MS | 268 KB | 450 | 2026-06-20 11:15:07 |
#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; } for(h=h;h>=n;h--){ for(k=k;k>=n+h;k++){ cout<<' '; } for(l=h*2-1;l>=1;l--){ cout<<'*'; } cout<<endl; } return 0; }
------Input------
5
------Answer-----
* *** ***** ******* ********* ******* ***** *** *
------Your output-----
* *** ***** ******* ********* *********** *********