[SWEA D2] 1946. 간단한 압축 풀기

shin·2022년 11월 16일
0

CodingTest 문제 풀이

목록 보기
38/79

문제 : [SWEA D2] 1946. 간단한 압축 풀기

풀이

T = int(input())
for t in range(1, T + 1):
    N = int(input())
    arr = [list(input().split(" ")) for _ in range(N)]
    count = 0
    print(f"#{t}")
    for a in arr:
        for i in range(int(a[1])):
            print(a[0], end = "")
            count += 1
            if count % 10 == 0:
                print()
    print()
profile
Backend development

0개의 댓글