Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
3435 | 莫业祁 | 31单词的长度 | C++ | Wrong Answer | 0 MS | 256 KB | 305 | 2024-06-08 10:05:00 |
# include<iostream> using namespace std; int main(){ string s1; cin>>s1; int n=s1.size(); int s=0; for(int i=0;i<n;i++){ if(s1[i]==' '){ cout<<s; if(i!=n-1) cout<<","; s=0; } else s++; } return 0; }
------Input------
Good morning.
------Answer-----
4,8
------Your output-----