-Code
replacement = "aeiouy"
for _ in range(int(input())):
s = input()
res = ""
for w in s:
if w.lower() in replacement:
idx = (replacement.find(w.lower()) + 1) % len(replacement)
if w.isupper():
res += replacement[idx].upper()
else:
res += replacement[idx]
continue
res += w
print(res)
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 15083번 Life Savings (0) | 2024.04.18 |
---|---|
[백준/파이썬] 30544번 Cuckoo! Cuckoo! (0) | 2024.04.17 |
[백준/파이썬] 30617번 Knob (0) | 2024.04.15 |
[백준/파이썬] 25965번 미션 도네이션 (0) | 2024.04.14 |
[백준/파이썬] 19751번 Fractification (0) | 2024.04.13 |