백준 11269번: Cryptographer’s Conundrum #Python

ColorlessDia·2025년 11월 24일

algorithm/baekjoon

목록 보기
736/808
S = input()

count = 0
PER = ['P', 'E', 'R']

for i in range(len(S)):
    char = S[i]
    target = PER[i % 3]

    if char != target:
        count += 1

print(count)

0개의 댓글