标签:block end include space style i++ pac ide dde
#include <iostream> #include <string> using namespace std; int main(){ int j,a; string str,temp; while(cin>>str>>temp&&str[0]!=‘#‘) { a=j=0; for(int i=0;i<str.size();i++){ if(str[i]==temp[j]){ j++; if(j==temp.length()){ a++; j=0; } } else{ i-=j; j=0; } } cout<<a<<endl; } return 0; }
标签:block end include space style i++ pac ide dde
原文地址:https://www.cnblogs.com/Rhythm-/p/9348900.html