[2022.02.17]
T = int(input())
nums = [["ZRO",0], ["ONE",1], ["TWO",2] , ["THR",3], ["FOR",4],
["FIV",5], ["SIX",6], ["SVN",7], ["EGT",8], ["NIN",9]]
for tc in range(T):
tcn,tclen = map(str,input().split())
arr = list(map(str,input().split()))
board = [0]*10
for i in arr:
for j in nums:
if i == j[0]:
board[j[1]] += 1
print(f'{tcn}')
for i in range(10):
print((f'{nums[i][0]} ')*board[i], end=' ')
'코딩테스트 > SWExpertAcademy' 카테고리의 다른 글
[Python] SWEA 4865 - 글자수 (0) | 2022.04.13 |
---|---|
[Python] SWEA 4864 - 문자열비교 (0) | 2022.04.13 |
[Python] SWEA 13704 - 달팽이숫자 (0) | 2022.04.13 |
[Python] SWEA 13702 - 델타검색 (0) | 2022.04.13 |
[Python] SWEA 4843 - 특별한 정렬 (0) | 2022.04.13 |
댓글