Beakjoon&프로그래머스/파이썬
[백준/파이썬] 27333번JOI エディタ (JOI Editor)
현장
2023. 3. 7. 15:39
-Code
n = int(input())
s = list(input())
for i in range(n - 1):
if s[i] in ['j', 'o', 'i'] and s[i] == s[i + 1]:
s[i], s[i + 1] = s[i].upper(), s[i + 1].upper()
print(*s, sep='')