Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
5531 | D班-罗炜翰 | 三角形之二 | C++ | Wrong Answer | 0 | 1 MS | 264 KB | 434 | 2025-02-09 17:51:13 |
#include<bits/stdc++.h> using namespace std; int main() { int a,n; cin>>n; for(int i = 1;i <= n-1;i++) { a = n - i; for(int j = 1;j <= a;j++) { cout<<' '; } for(int k = 1;k <= i;k++) { cout<<'*'; } cout<<endl; } for(int i = n;i >= 1;i--) { a = n - i; for(int j = a;j >= 1;j--) { cout<<' '; } for(int k = i;k >= 1;k--) { cout<<'*'; } cout<<endl; } }