SMALL
문제출처
2941번: 크로아티아 알파벳
예전에는 운영체제에서 크로아티아 알파벳을 입력할 수가 없었다. 따라서, 다음과 같이 크로아티아 알파벳을 변경해서 입력했다. 크로아티아 알파벳 변경 č c= ć c- dž dz= đ d- lj lj nj nj š s= ž z=
www.acmicpc.net
풀이코드
word=input()
alphas=['c=','c-','dz=','d-','lj','nj','s=','z=']
cnt=0
for alpha in alphas:
if alpha in word:
cnt+=word.count(alpha)
answer = len(word)-cnt*2+cnt
print(answer)
LIST
'알고리즘-python > 백준 문제' 카테고리의 다른 글
[백준/1712/파이썬(Python3)] 손익분기점 (0) | 2021.07.07 |
---|---|
[백준/1316/파이썬(Python3)] 그룹 단어 체커 (0) | 2021.07.06 |
[백준/5622/파이썬(Python3)] 다이얼 (0) | 2021.07.02 |
[백준/2675/파이썬(Python3)] 문자열 반복 (0) | 2021.07.02 |
[백준/10809/파이썬(Python3)] 알파벳 찾기 (0) | 2021.07.01 |