1 条题解

  • 0
    @ 2024-11-9 14:14:25
    #include<iostream>
    using namespace std;
    int main(){
    	string s; bool b=false;
    	int n,ans=0;
    	cin>>n;
    	getchar();
    	getline(cin,s);
    	for(int i=0;i<s.length();i++){
    		if(s[i]=='z' and b==false){
    			ans++;
    			b=true;
    		}		
    		if(s[i]==' ')
    			b=false;	
    	}
    	//cout<<s<<endl;
    	cout<<ans;
    	return 0;
    } 
    
    • 1

    信息

    ID
    1778
    时间
    1000ms
    内存
    256MiB
    难度
    (无)
    标签
    (无)
    递交数
    0
    已通过
    0
    上传者