Run ID:118435

提交时间:2025-05-01 22:38:06

#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string input; getline(cin, input); transform(input.begin(), input.end(), input.begin(), ::tolower); string target = "lanqiao"; int count = 0; size_t pos = 0; while ((pos = input.find(target, pos)) != string::npos) { count++; pos += target.length(); } cout << count << endl; return 0; }