Problems > Reverse a String

Reverse a String

Difficulty: 900 1000 ms 128 MB

implementation strings

Print the given string reversed.

Input: one line containing a string S (1 ≤ |S| ≤ 105) of printable ASCII characters without spaces.

Output: the string S reversed.

Sample Tests

Input 1
hello
Output 1
olleh
Input 2
ab
Output 2
ba

Read the Editorial Statistics

Discussion (opens after you solve — no spoilers before)

No comments yet.

Submit Your Solution

Log in or create a free account to run and submit code.
Ctrl+Enter submit · Ctrl+Space autocomplete · F11 fullscreen