MapleStory Finger Point

๐Ÿƒ‍โ™‚๏ธBaekjoon/Python

#2444 - python

HYEJU01 2024. 4. 19. 06:22

 

n = int(input())
# 2 * n-1
for i in range (0,n,1) : 
    for j in range (n-i,1,-1): 
        print(" ",end="")
    for j in range (0,i+1,+1): 
        print("*", end="")
    for j in range (1,i+1,+1): 
        print("*", end="")
    print( )

for i in range (1,n,+1) :
    for j in range (0,i,+1):  
        print(" ",end="") 
    for j in range (n-i,0,-1): 
        print("*", end="")
    for j in range (n-i-1,0,-1): 
        print("*", end="")
    print( )

 

C ์–ธ์–ด๋กœ ํ’€๋•Œ๋งˆ๋ƒฅ ํ’€์–ด๋ฒ„๋ ค์„œ ๊ทธ๋Ÿฐ๊ฐ€ ๊ธธ์ด๊ฐ€ ๊ธธ์–ด์ง€๊ณ  ๋‚œ์žกํ•˜๋‹ค ใ…œใ…œ 

 

 

 

๐Ÿ’Ž ์ข‹์€ ์ฝ”๋“œ 

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))