https://www.acmicpc.net/problem/2441
별 찍기 - 1과는 반대로 오른쪽 위에 삼각형이 있으므로 i보다 j가 클 때 별을 찍어주면 된다.
1
2
3
4
5
6
7
8
9
|
N = int(input())
for i in range(N):
for j in range(N):
if (i <= j):
print("*", end='')
else:
print(" ", end='')
print("")
|
cs |