[Python , VER2.0] 백준 2439번 별찍기 -2★Range 거꾸로 가기
2023. 3. 27. 16:30
728x90
반응형
VERSION 2.0
import sys
N = int(sys.stdin.readline())
for i in range(N-1,-1,-1):
A = " " * i
B = "*" * (N-i)
print(A+B)
==> range 거꾸로 가기
VERSION 1.0
import sys
N = int(sys.stdin.readline())
for i in range(1,N+1):
print(' '*(N-i)+('*'*i))
728x90
반응형
'Python(백준) > 반복문' 카테고리의 다른 글
[Python, Ver 2.0] 백준 25304번 영수증 ★ map() 활용하기 (0) | 2023.03.27 |
---|---|
[Python , VER2.0] 백준 11021번 A+B-7★리스트에 문자열 추가하기 (1) | 2023.03.27 |
[Python , Ver2.0] 백준 11021번 A+B-7★list(map) (1) | 2023.03.27 |