| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 150485 | 李昱龙 | 打印菱形 | C++ | Accepted | 3 MS | 276 KB | 380 | 2026-03-28 14:20:29 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; for(int j=1;j<=n;j++){ for(int b=1;b<=n-j;b++){ cout<<" "; } for(int i=1;i<=2*j-1;i++){ cout<<"*"; } cout<<endl; } for(int c=n-1;c>=1;c--){ for(int a=1;a<=n-c;a++){ cout<<" "; } for(int i=1;i<=2*c-1;i++){ cout<<"*"; } cout<<endl; } return 0; }