good morning 题解:find
P1207
发布于2025年3月14日 10:29
阅读数 156
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
while(getline(cin,s)){
int ct=0;
while(s.find("good morning")!=string::npos){
s.erase(s.find("good morning"),12);
ct++;
}
cout<<ct<<endl;
}
}
登录后发布评论
暂无评论,来抢沙发