标题算法训练 字串逆序
时间限制:1.0s 内存限制:512.0MB
提交此题
问题描述
给定一个字符串,将这个串的所有字母逆序后输出。
输入格式
输入包含一个字符串,长度不超过100,字符串中不含空格。
输出格式
输出包含一个字符串,为上面字符串的逆序。
样例输入
tsinsen
样例输出
nesnist
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
reverse(s.begin(),s.end());
cout<<s;
}