Programming/Python & Data Structures
[Baekjoon/Python3] 10990번 별 찍기 - 15
HooNeee
2020. 12. 7. 00:06
[Baekjoon/Python3] 10990번 별 찍기 - 15
10990번: 별 찍기 - 15
예제를 보고 규칙을 유추한 뒤에 별을 찍어 보세요.
www.acmicpc.net
n = int(input())
print(' ' * (n - 1) + '*')
for i in range(1, n):
print(' ' * (n - i - 1) + '*' + ' ' * (i * 2 - 1) + '*')