| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 70104 | 石茂诤 | 31统计单词数 | C++ | Accepted | 1 MS | 288 KB | 203 | 2024-04-13 16:51:23 |
#include<bits/stdc++.h> using namespace std; int main(){ string a; getline(cin,a); int n=0,s=a.length(); for(int i=0;i<s;i++){ if(a[i]==' '){ n++; } } cout<<n+1; return 0; }