2 条题解
- 1
信息
- ID
- 381
- 时间
- 1000ms
- 内存
- 256MiB
- 题目 Rating
- 标签
- 递交数
- 129
- 已通过
- 80
- 上传者
666,别告诉别人,害怕被骂喵; 没学过reverse怎么办? 我有一招;
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
string a;
getline (cin , a);
int i = 0;
int j = a.size() - 1;
while ( i <= j ){
swap(a[i],a[j]);
i++;
j--;
}
cout << a;
return 0;
}