| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158834 | 王慕哲 | 词组缩写 | C++ | Compile Error | 0 MS | 0 KB | 517 | 2026-08-22 17:50:20 |
#include <iostream> using namespace std; int main() { int T; cin>>T; cin.ignore(); while(T--){ string s;1 getline(cin,s); string n_s; for(int i=0;i<s.size();i++){ bool f=1; if(s[i]==' '){ f=1; } else{ if(f==1){ n_s+=toupper(s[i]); f=0; } } } cout<<n_s<<endl; } return 0; }
Main.cc: In function 'int main()':
Main.cc:9:9: error: expected ';' before 'getline'
getline(cin,s);
^
Main.cc:9:23: warning: statement has no effect [-Wunused-value]
getline(cin,s);
^
Main.cc:11:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i