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

[백준/파이썬] 31245번 ТАБЕЛА

by 현장 2025. 3. 14.

-Code

li = list(input().split())
res = li[0]

for el in li[1:]:
    if res[-1] == el[0]:
        res += "'" + el[1:]
        continue
    res += el
print(res)