백준 2941번 Python 풀이

Myeonggeun Shin·2025년 1월 27일

문제

백준 2941번
제목 : 크로아티아 알파벳


풀이

# Python3
s = input()
croatia = ['c=', 'c-', 'dz=', 'd-', 'lj', 'nj', 's=', 'z=']

for i in croatia:
    s = s.replace(i, '*')

print(len(s))

0개의 댓글