Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
118278 吴梓玄 单词翻转 C++ Wrong Answer 1 MS 260 KB 290 2025-04-26 16:38:20

Tests(0/10):


Code:

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


Run Info:

------Input------
123 45
------Answer-----
321 54
------Your output-----
321 45