Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
63375 祝家懿 打印三角形 C++ Accepted 5 MS 268 KB 275 2024-01-07 16:34:20

Tests(15/15):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int a; cin>>a; int x=1; int z=a-1; for(int i=1;i<=a;i++){ for(int k=1;k<=z;k++){ cout<<' '; } z--; for(int j=1;j<=x;j++){ cout<<"*"; } cout<<endl; x+=2; } return 0; }