๋ฌธ์
https://www.acmicpc.net/problem/2447
ํ์ด
# ๋ฐฑ์ค 2447๋ฒ ๋ฌธ์ - ๋ณ ์ฐ๊ธฐ 10
n = int(input())
def star(l):
if l == 3:
return ['***','* *','***']
arr = star(l//3)
stars = []
for i in arr:
stars.append(i*3)
for i in arr:
stars.append(i+' '*(l//3)+i)
for i in arr:
stars.append(i*3)
return stars
print('\n'.join(star(n)))
'๐๏ธ Algorithm > ๐ฉ ๋ฐฑ์ค' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
๐ฉ [๋ฐฑ์ค] [Python] [Gold5] 9251๋ฒ_LCS (0) | 2023.04.21 |
---|---|
๐ฉ [๋ฐฑ์ค] [Python] [Gold5] 1011๋ฒ_Fly me to the Alpha Centauri (0) | 2023.04.21 |
๐ฉ [๋ฐฑ์ค] [Python] [Gold4] 7662๋ฒ_์ด์ค ์ฐ์ ์์ ํ (0) | 2023.04.20 |
๐ฉ [๋ฐฑ์ค] [Python] [Gold3] 1520๋ฒ_๋ด๋ฆฌ๋ง ๊ธธ (0) | 2023.04.19 |
๐ฉ [๋ฐฑ์ค] [Python] [Silver1] 1991๋ฒ_ํธ๋ฆฌ ์ํ (0) | 2023.04.19 |