백준 10990번: 별 찍기 - 15 #Python

ColorlessDia·2024년 12월 20일

algorithm/baekjoon

목록 보기
397/808
import sys

N = int(sys.stdin.readline())

for i in range(1, N + 1):
    
    print(' ' * (N - i), end='')

    if i == 1:
        print('*')
    else:
        print('*' + (' ' * (((i - 1) * 2) - 1))  + '*')

0개의 댓글