https://www.acmicpc.net/problem/14175
문제
Bessie and her cow friends are playing as their favorite cow superheroes. Of course, everyone knows that any self-respecting superhero needs a signal to call them to action. Bessie has drawn a special signal on a sheet of M×N paper (1≤M≤10,1≤N≤10), but this is too small, much too small! Bessie wants to amplify the signal so it is exactly K times bigger (1≤K≤10) in each direction.
The signal will consist only of the '.' and 'X' characters.
입력
The first line of input contains M, N, and K, separated by spaces.
The next M lines each contain a length-N string, collectively describing the picture of the signal.
출력
You should output KM lines, each with KN characters, giving a picture of the enlarged signal.
백준 14175 "The Cow-Signal" 문제입니다.
각 문자를 K배만큼 불려주면 되는 문제입니다.
import sys
M, N, K = map(int, sys.stdin.readline().split())
for _ in range(M):
a = sys.stdin.readline().strip()
for i in range(K):
result = str()
for j in range(len(a)):
result += a[j] * K
print(result)
'백준 알고리즘' 카테고리의 다른 글
파이썬) 백준 알고리즘 | 17128번 : 소가 정보섬에 올라온 이유 (0) | 2022.01.31 |
---|---|
파이썬) 백준 알고리즘 | 9461번 : 파도반 수열 (0) | 2022.01.30 |
파이썬) 백준 알고리즘 | 9494번 : Text Roll (0) | 2022.01.30 |
파이썬) 백준 알고리즘 | 14582번 : 오늘도 졌다. (0) | 2022.01.30 |
파이썬) 백준 알고리즘 | 1764번 : 듣보잡 (0) | 2022.01.30 |
댓글