Algorithm/practice
[백준 2523번] 별찍기-13
연두연두부
2020. 7. 8. 13:33
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 * '*')