Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 591 Bytes

File metadata and controls

27 lines (22 loc) · 591 Bytes

백준 2447번 별 찍기 - 10

2447


소스코드

  • 메모리 : 33828 KB
  • 시간 : 112 ms
def draw(n):
    if n == 1: return ['*'] 
      
    star = draw(n//3) 
    lst = []
    for s in star: lst.append(s*3)
    for s in star: lst.append(s+' '*(n//3)+s)
    for s in star: lst.append(s*3)
    return lst

n = int(input())
stars = draw(n)
for i in range(len(stars)):
    print(stars[i])