0006 - Reverse Sequence / AizuOnlineJudge
問題 : 文字列を逆順に出力 | Aizu Online Judge
#include <algorithm> #include <iostream> #include <string> using namespace std; void Solve(string str) { reverse( str.begin(),str.end() ); cout << str << endl; } int main(void) { string str; cin >> str; Solve(str); return 0; }
algorithmヘッダのreverseを用い、文字列を逆出力。
~了~