BAEKJOON (Python)/단계별

BAEKJOON_2444 "별 찍기 - 7" PYTHON

RiLLa_0511 2023. 2. 22. 00:52
728x90

[백준] 2444번 Python 파이썬

 

https://www.acmicpc.net/problem/2444

 

2444번: 별 찍기 - 7

첫째 줄부터 2×N-1번째 줄까지 차례대로 별을 출력한다.

www.acmicpc.net

n = int(input())

for i in range(1,n+1):

    print(' '*(n-i)+'*'*(2*i-1))

for i in range(n-1,0,-1):

    print(' '*(n-i)+'*'*(2*i-1))