본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 13419번 탕수육

by 현장 2023. 4. 29.

-Code

for _ in range(int(input())):
    s = input()
    hg = s[0::2]
    tw = s[1::2]
    if len(s) % 2 == 1:
        hg += s[1::2]
        tw += s[0::2]
    print(hg)
    print(tw)