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

[백준/파이썬] 30700번 KOREA 문자열 만들기

by 현장 2024. 6. 4.

-Code

korea = "KOREA"

s = input()
res = ""

for w in s:
    if korea[len(res) % 5] == w:
        res += w

print(len(res))