Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
118443 | 毛靖平 | 单词的长度 | C++ | Accepted | 1 MS | 268 KB | 287 | 2025-05-02 15:34:51 |
#include<bits/stdc++.h> char n[1001]; using namespace std; int main() { cin.getline(n,1000); int sd=0; for (int i = 0;i<strlen(n); i++) { if(n[i]!=' '){ sd++; } else{ cout<<sd<<","; sd=0; } } cout<<sd; return 0; }