쉬운 문제..
def converter(str):
dataList = ["c=", "c-", "dz=", "d-", "lj", "nj", "s=", "z="]
for i in range(8):
str = str.replace(dataList[i], "0")
return len(str)
print(converter(input()))
'Algorithm > String' 카테고리의 다른 글
[백준] 3059번 등장하지 않는 문자의 합 (0) | 2021.02.08 |
---|---|
[백준] 9935번 문자열 폭발 (0) | 2021.02.08 |
[백준] 1764번 듣보잡 (0) | 2021.02.08 |
[백준] 1213번 팰린드롬 만들기 (0) | 2021.01.08 |
[백준] 9012번 괄호 (0) | 2020.11.25 |
댓글