求解!!!!!!!!(有关注)
查看原帖
求解!!!!!!!!(有关注)
1534263
liuzicheng100楼主2024/11/2 08:55

源代码 :

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,c=0;cin>>n;
	string s;
	cin>>s;
	for(int i=1;i<=s.size();i++){
		if(s[i]=='V'&&s[i+1]=='K')c++;
	} 
	cout<<c;
	return 0;
}

2024/11/2 08:55
加载中...