Programming/Python & Data Structures
[Baekjoon/Python3] 2446번 별 찍기 - 9
HooNeee
2020. 12. 3. 01:30
[Baekjoon/Python3] 2446번 별 찍기 - 9
2446번: 별 찍기 - 9
첫째 줄부터 2×N-1번째 줄까지 차례대로 별을 출력한다.
www.acmicpc.net
n = int(input())
for i in range(n):
print(' ' * i + '*' * (2 * n - (2 * i + 1)))
for j in range(1, n):
print(' ' * (n - j - 1) + '*' * (2 * j + 1))