import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class BOJ_1543 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine(); // 문서
String word = br.readLine(); // 찾을 단어
int lengthBefore = str.length();
str = str.replace(word, "");
int lengthAfter = str.length();
System.out.println((lengthBefore - lengthAfter) / word.length());
}
}
'OJ' 카테고리의 다른 글
[SWEA] 1218 괄호 짝짓기 (JAVA) (0) | 2022.08.03 |
---|---|
[SWEA] 1210 Ladder1 (JAVA) (0) | 2022.08.02 |
[BOJ] 2615 오목 (JAVA) (0) | 2022.07.24 |
[BOJ] 15552 빠른 A+B (JAVA) (0) | 2022.07.17 |
[BOJ] 10953 A+B - 6 (JAVA) (0) | 2022.07.14 |