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