T = int(input())

for t in range(1, T+1):
    abcde = [0, 0, 0, 0, 0]
    lst = [2, 3, 5, 7, 11]

    n = int(input())

    for i in range(len(lst)):
        num = lst[i]
        while n % num == 0:
            n //= num
            abcde[i] += 1

    a = abcde[0]
    b = abcde[1]
    c = abcde[2]
    d = abcde[3]
    e = abcde[4]
    print('#{} {} {} {} {} {}'.format(t, a, b, c, d, e))

'알고리즘 문제 풀이 > SWEA' 카테고리의 다른 글

[SWEA 2001 python] 파리 퇴치  (0) 2021.08.13
[SWEA 1209 python] Sum  (0) 2021.08.13
[SWEA 1954 python] 달팽이 숫자  (0) 2021.08.13
[SWEA 1208 python] Flatten  (0) 2021.08.13
[SWEA 5789 python] 현주의 상자 바꾸기  (0) 2021.08.13

+ Recent posts