| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 70102 | 刘宇轩 | 31单词的长度 | C++ | Wrong Answer | 1 MS | 276 KB | 251 | 2024-04-13 16:48:44 |
#include<iostream> using namespace std; int main(){ int a[1001],m=0; string b; getline(cin,b); int l=b.length(); for(int i=1;i<l;i++){ if(b[i]!=' '){ m++; } else{ cout<<m<<","; m=0; } } cout<<m; return 0; }
------Input------
I will stare no effort to master a good command of advance XXX.
------Answer-----
1,4,5,2,6,2,6,1,4,7,2,7,4
------Your output-----
0,4,5,2,6,2,6,1,4,7,2,7,4