Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
119742 黄睿杰 单词的长度 C++ Accepted 1 MS 264 KB 257 2025-05-18 18:03:32

Tests(5/5):


Code:

#include<bits/stdc++.h> using namespace std; char a[10000]; int main(){ int s=0; gets(a); int l=strlen(a); for(int i=0;i<l+1;i++){ if(a[i]==' '){ cout<<s<<","; s=0; } else if(a[i]=='\0') cout<<s; else s++; } return 0; }