| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 69568 | 李琥博 | 单词翻转 | C++ | Wrong Answer | 1 MS | 276 KB | 465 | 2024-04-05 17:27:34 |
#include<bits/stdc++.h> using namespace std; int main(){ string s; getline(cin,s); int n=s.size(),a=0,c=0; while(a<n){ while(s[c]!=' '){ c++; } for(int i=c-1;i>=a;i--){ cout<<s[i]; } while(s[c]==' '){ cout<<" "; c++; } a=c; } return 0; }
------Input------
123 45
------Answer-----
321 54
------Your output-----
321