Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
21078 | 邢逸轩 | 星号等腰三角形 | C++ | Accepted | 100 | 0 MS | 248 KB | 242 | 2021-06-26 15:06:00 |
#include<bits/stdc++.h> using namespace std; int n,p=1; int main(){ cin>>n; for(int i=1;i<=n;i++){ for(int j=1;j<=n-i;j++){ cout<<" "; } for(int k=1;k<=p;k++){ cout<<"*"; } p+=2; cout<<endl; } return 0; }