文章
13
粉丝
386
获赞
2
访问
65.7k
#include <iostream>
#include <cstdio>
#include <string>
using namespace std;
int main(){
string str1, str2;
while(cin >> str1 >> str2){
int num = 0;
int n1 = str1.size();
int n2 = str2.size();
for(int i = 0; i < n1; i++){
if(str1.substr(i, n2) == str2) num++;
}
printf("%d\n", num);
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发