[백준 2523번] 별찍기-13

2020. 7. 8. 13:33Algorithm/practice

https://www.acmicpc.net/problem/2523

 

2523번: 별 찍기 - 13

첫째 줄부터 2×N-1번째 줄까지 차례대로 별을 출력한다.

www.acmicpc.net

n = int(input())
lines = 2*n
for i in range(1, lines):
    starNum = i if i <= n else lines-i
    print(starNum * '*')

'Algorithm > practice' 카테고리의 다른 글