문제: 1543번 문서 검색

Sungmin·2023년 3월 22일
0

https://www.acmicpc.net/problem/1543


Solution

result = input()
include = input()

answer = result.split(include)
print(len(answer)-1)

배운점

문자열을 끊어가며 같은 문자의 개수를 세는 문제이다.
반복문을 통해 하나하나 접근해 가는 방식도 있지만
split함수를 활용하면 간단히 풀 수 있는 문제였다.

profile
Let's Coding

0개의 댓글