Notice
Recent Posts
Recent Comments
Link
«   2025/10   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

DANIELOGIC

[Python] 백준 2444번 별 찍기 - 7 본문

Algorithm/백준

[Python] 백준 2444번 별 찍기 - 7

daniel; 2024. 6. 24. 01:52

[Python] 백준 2444번 별 찍기 - 7

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

문제

코드

t = int(input())
for i in range(1,t):
    print(" "*(t-i)+"*"*(2*i-1))
for i in range(t,0,-1):
    print(" "*(t-i)+"*"*(2*i-1))

리뷰

각 줄의 뒷부분이 공백이 아님에 주의하자.

'Algorithm > 백준' 카테고리의 다른 글

[Python] 백준 2921번 도미노  (0) 2024.06.24
[Python] 백준 8892번 팰린드롬  (0) 2024.06.24
[Python] 백준 1408번 24  (0) 2024.06.23
[Python] 백준 5635번 생일  (0) 2024.06.23
[Python] 백준 1977번 완전제곱수  (0) 2024.06.23