| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 154211 | 杨启宏 | 打印沙漏 | C++ | Accepted | 1 MS | 272 KB | 695 | 2026-05-26 19:47:52 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int i; cin>>i; for(int j=0;j<=i-1;j++){ for(int m=1;m<=j;m++){ cout<<" "; } for(int k=1;k<=2*(i-1)-(2*j-1);k++){ cout<<"*"; } cout<<endl; } for(int j=2;j<=i;j++){ for(int m=1;m<=i-j;m++){ cout<<" "; } for(int k=1;k<=2*j-1;k++){ cout<<"*"; } cout<<endl; } return 0; }