#include <iostream>
#include <string>
using namespace std;
int countYoutoo(const string& str) {
int count = 0;
string target = "youtoo";
int targetLen = target.length();
if (str.length() < targetLen) {
return 0;
}
for (size_t i = 0; i <= str.length() - targetLen; i++) {
if (str.substr(i, targetLen) == target) {
count++;
}
}
return count;
}
int main() {
string input;
cin>>input;
int result = countYoutoo(input);
cout << result << endl;
return 0;
}
You too!
这是 2025年12月18日 存档的第 1 版,不是当前版本。查看当前版本