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

[백준/파이썬] 25246번 Brexiting and Brentering

by 현장 2024. 4. 8.

-Code

vowels = "aeiou"
s = input()
res = s

for i in range(len(s) - 1, -1, -1):
    if s[i].lower() in vowels:
        res = s[:i + 1] + "ntry"
        break
print(res)