문제
이 문제에는 표준 입력으로 두 개의 정수 n과 m이 주어집니다.
별(*) 문자를 이용해 가로의 길이가 n, 세로의 길이가 m인 직사각형 형태를 출력해보세요.
코드
a, b = map(int, input().strip().split(' '))
for _ in range(b) :
print(a * '*')
a, b = map(int, input().strip().split(' '))
print(("*" * a + "\n") * b)
출처
반응형
'Algorithm > Python' 카테고리의 다른 글
[stratascratch] Number Of Units Per Nationality(Python) (0) | 2021.08.22 |
---|---|
[프로그래머스] 시저 암호 (Python) (0) | 2021.08.20 |
[stratascratch] Bikes Last Used(Python) (0) | 2021.08.19 |
[stratascratch] Churro Activity Date(Python) (0) | 2021.08.19 |
[stratascratch] Customer Details(Python) (0) | 2021.08.15 |