Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
125216 晏莞煜 打印三角形 C++ Accepted 3 MS 268 KB 277 2025-07-14 09:56:25

Tests(15/15):


Code:

#include<iostream> using namespace std; int main(){ int n; cin>>n; int k=0,y=1; int w=1; for(int i=n-k;i>0;i--){ for(int u=n-y;u>0;u--){ cout<<" "; } for(int q=1;q<=w;q++){ cout<<"*"; } k++; w+=2; y++; cout<<endl; } return 0; }