본문 바로가기
python-algorithm

백준 1543 문서 검색

by 무적김두칠 2021. 12. 21.

1
2
3
4
s=input()
target=input()
cnt=len(s)
print(s.count(target))
cs

python count는 중복 제거해서 알아서 카운팅해주네요 

반응형

'python-algorithm' 카테고리의 다른 글

백준 10825 국영수  (0) 2021.12.21
백준 11656 접미사 배열  (0) 2021.12.21
백준 3276 ICONS  (0) 2021.12.21
백준 9625 BABBA  (0) 2021.12.21
백준 11536 줄 세우기  (0) 2021.12.16

댓글