Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
113272 吴梓玄 31单词的长度 C++ Accepted 1 MS 272 KB 273 2025-03-15 16:16:31

Tests(5/5):


Code:

#include <bits/stdc++.h> using namespace std; int main() { char s[1005]; gets(s); int n=0; int m=strlen(s); for(int i=0;i<m;i++){ if (s[i]==' '){ cout << n << ','; n = 0; continue; } n = n + 1; } cout << n << endl; return 0; }