Run ID:159205
提交时间:2026-08-26 18:02:31
#include<bits/stdc++.h> using namespace std; int main() { string s; long long n=s.length(),h=0,z=0; getline(cin,s); for(int i=0;i<n;i++){ if(s[i]!=' '){ z++; } else if(z>0){ h++; } z=0; } cout<<h; return 0; }