| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 68896 | 李琥博 | 31单词的长度 | C++ | Compile Error | 0 MS | 0 KB | 406 | 2024-03-27 21:42:29 |
#include<iostream> #include<cstring> using namespace std; int main(){ string s; getline(cin,s); int a=0; for(int i=0;i<s.length();i++){ if(s[i]==' '){ while(s[i+1]==' '){ i++; } cout<<n<<","; n=0; }else{ a++; } } cout<<n; return 0; }
Main.cc: In function 'int main()': Main.cc:8:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0;i