문제풀이/SW Expert Academy

[SWEA][D2] 1946. 간단한 압축 풀기 (파이썬/Python)

얄루몬 2021. 10. 8. 13:42

t = int(input())

for tc in range(1, t+1):
    n = int(input())
    lst = ''
    for i in range(n):
        alpha, num = input().split()
        lst += alpha*int(num)
    print(f'#{tc}')
    for i in range(0,len(lst),10):
        print(lst[i:i+10])