Run ID:159203

提交时间:2026-08-26 17:47:37

#include<bits/stdc++.h> using namespace std; int main() { string s; int n=s.length(),h=0,z=0; getline(cin,s); for(int i=0;i<n;i++){ if(s[i]!=' '){ z++; } if(z>0){ h++; } } cout<<h; return 0; }