백준 6929번: Dressing Up #Python

ColorlessDia·2025년 11월 1일

algorithm/baekjoon

목록 보기
713/808
H = int(input())

H2 = H * 2

for i in range(1, H + 1):
    N = (i * 2) - 1

    if H < N:
        N = (H * 2) - N
    
    N2 = N * 2

    print(f'{'*' * N}{' ' * (H2 - N2)}{'*' * N}')

0개의 댓글