提交时间:2026-01-28 20:01:29

运行 ID: 83602

#include<bits/stdc++.h> using namespace std; int main(){ int l; cin>>l; string s; getline(cin,s); int renpinzhi=0; for(int i=0;i<l-2;++i){ if(s[i]=='C'&&s[i+1]=='S'&&s[i+2]=='P') ++renpinzhi; } cout<<renpinzhi; return 0; }