Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
125189 | 晏莞煜 | 打印三角形 | C++ | Wrong Answer | 4 MS | 264 KB | 250 | 2025-07-14 09:29:56 |
#include<iostream> using namespace std; int main(){ int n; cin>>n; int y=1; for(int i=n-y;i>=0;i--){ for(int q=1;q<=i;q++){ cout<<" "; } for(int w=1;w<=n-i;w+=2){ cout<<"*"; } cout<<endl; y++; } return 0; }
------Input------
84
------Answer-----
* *** ***** ******* *********
------Your output-----
* * ** ** *** ***