UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#170297#1130. 直角三角形(2)luojianwei22161000ms1188kbC++229b2023-04-01 21:25:522023-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;
}

详细

小提示:点击横条可展开更详细的信息

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