Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
5017 | A班-许锘林 | 打印字符三角形 | C++ | Accepted | 100 | 1 MS | 264 KB | 266 | 2025-01-19 15:52:57 |
#include <bits/stdc++.h> using namespace std; int main() { char a; cin>>a; int n = 3,j,i,l; for(i=1;i<=n;i++) { for(l=1;l<=n-i;l++) { cout<<" "; } for(j=1;j<=2*i-1;j++) { cout<<a; } cout<<endl; } return 0; }