ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#170297 | #1130. 直角三角形(2) | luojianwei2216 | 100 | 0ms | 1188kb | C++ | 229b | 2023-04-01 21:25:52 | 2023-04-01 21:25:54 |
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
for(int i = 1; i <= n; i++) {
for(int j = 1; j <= i; j++) {cout << '*';}
if(i == n) cout << ' ';
else cout << endl;
}
return 0;
}
Details
小提示:点击横条可展开更详细的信息
Test #1:
score: 20
Accepted
time: 0ms
memory: 1184kb
input:
10
output:
* ** *** **** ***** ****** ******* ******** ********* **********
result:
ok 10 lines
Test #2:
score: 20
Accepted
time: 0ms
memory: 1188kb
input:
13
output:
* ** *** **** ***** ****** ******* ******** ********* ********** *********** ************ **********...
result:
ok 13 lines
Test #3:
score: 20
Accepted
time: 0ms
memory: 1188kb
input:
10
output:
* ** *** **** ***** ****** ******* ******** ********* **********
result:
ok 10 lines
Test #4:
score: 20
Accepted
time: 0ms
memory: 1188kb
input:
12
output:
* ** *** **** ***** ****** ******* ******** ********* ********** *********** ************
result:
ok 12 lines
Test #5:
score: 20
Accepted
time: 0ms
memory: 1184kb
input:
14
output:
* ** *** **** ***** ****** ******* ******** ********* ********** *********** ************ **********...
result:
ok 14 lines