| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 151262 | 杜禹轩 | 打印沙漏 | C++ | Wrong Answer | 1 MS | 272 KB | 439 | 2026-04-11 14:14:13 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; for(int i=n-1;i>=1;i--){//第几行 for(int p=1;p<=n-i;p=p+1){//列数 cout<<" "; } for(int o=1;o<=2*i-1;o++){ cout<<'*'; } cout<<endl; } for(int i=1;i<=n;i++){//第几行 for(int p=1;p<=n-i;p=p+1){//列数 cout<<" "; } for(int o=1;o<=2*i-1;o++){ cout<<'*'; } cout<<endl; } return 0; }
------Input------
3
------Answer-----
***** *** * *** *****
------Your output-----
*** * * *** *****