쉽고 깔끔하게
[프로그래머스/python3] Level 1 직사각형 별찍기 문제풀이 본문
728x90
반응형

문제
programmers.co.kr/learn/courses/30/lessons/12969
코딩테스트 연습 - 직사각형 별찍기
이 문제에는 표준 입력으로 두 개의 정수 n과 m이 주어집니다. 별(*) 문자를 이용해 가로의 길이가 n, 세로의 길이가 m인 직사각형 형태를 출력해보세요. 제한 조건 n과 m은 각각 1000 이하인 자연수
programmers.co.kr
별(*) 문자를 이용해 가로의 길이가 n, 세로의 길이가 m인 직사각형 형태를 출력해보세요.
<정답>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n, m = map(int, input().strip().split(' ')) | |
for i in range(m): | |
print('*' * n) |
728x90
반응형
'Algorithm > Programmers' 카테고리의 다른 글
[프로그래머스/python3] Level 1 예산 문제풀이 (0) | 2021.01.27 |
---|---|
[프로그래머스/python3] Level 1 자연수 뒤집어 배열로 만들기 문제풀이 (0) | 2021.01.27 |
[프로그래머스/python3] Level 1 x만큼 간격이 있는 n개의 숫자 문제풀이 (0) | 2021.01.25 |
[프로그래머스/python3] Level 1 문자열 내 p와 y의 개수 문제풀이 (0) | 2021.01.25 |
[프로그래머스/python3] Level 1 제일 작은 수 제거하기 문제풀이 (0) | 2021.01.22 |