Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
109191 胡海峰老师 打印三角形 C++ Accepted 4 MS 272 KB 251 2025-02-05 23:04:03

Tests(15/15):


Code:

#include <iostream> using namespace std; int main(){ int n; cin>>n; for( int j=1;j<=n;j++) { for(int t=1;t<=n-j;t++) cout<<" "; for(int t=1;t<=2*j-1;t++) cout<<"*"; cout<<endl; } return 0; }