| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 150371 | 翁思宸 | 31单词的长度 | C++ | Accepted | 1 MS | 276 KB | 397 | 2026-03-27 19:21:24 |
//1416 31单词的长度 #include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int main(){ string n; int a,s=0,l; getline(cin,n); l=n.length(); for(int i=0;i<l;i++){ if(n[i]!=' '){ s++; } else { cout<<s<<","; s=0; } } cout<<s; return 0; }