너구리의 세상 분석

[Softeer][level2] [한양대 HCPC 2023] X marks the Spot - 파이썬(Python) 풀이 본문

Python/Python, Algorithm

[Softeer][level2] [한양대 HCPC 2023] X marks the Spot - 파이썬(Python) 풀이

너굴씨 2024. 6. 13. 10:24

import sys
blank = []
for i in range(int(input())):
    s, t = map(str, input().split())
    t = list(t)
    if 'x' in s:
        s_index = list(s).index('x')
    else:
        s_index = list(s).index('X')
    blank.append(t[s_index])
print("".join(blank).upper())