| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 82385 | 石晋骁 | 31统计单词数 | C++ | Accepted | 1 MS | 288 KB | 228 | 2024-07-13 11:11:18 |
#include<bits/stdc++.h> using namespace std; int main(){ string s; int cs = 0,sl =0; getline(cin,s); sl = s.size(); for(int i =0;i < sl;i++){ if(s[i] == ' '){ cs++; } } cout << cs+1; return 0; }