Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
159254 李沐阳 31统计单词数 C++ Wrong Answer 1 MS 280 KB 265 2026-08-27 13:12:40

Tests(1/10):


Code:

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


Run Info:

------Input------
aniVd
------Answer-----
1
------Your output-----
0