백준 2789번: 유학 금지 #Python

ColorlessDia·2025년 12월 10일

algorithm/baekjoon

목록 보기
752/807
S = input()

char_set = set('CAMBRIDGE')
formatted_string = []

for char in S:

    if char not in char_set:
        formatted_string.append(char)

print(''.join(formatted_string))

0개의 댓글