ROT13
Time limit1sMemory limit256 MB
Encrypt the given string with ROT13, shifting each English letter by 13 places and leaving other characters unchanged.
- Level
Easy1 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
ROT13 is a Caesar cipher that shifts every English letter forward by 13 places.
For example, encrypting "Programming Online Judge" with ROT13 gives "Cebtenzzvat Bayvar Whqtr". Applying ROT13 once more to an encrypted string restores the original text, so "Cebtenzzvat Bayvar Whqtr" turns back into "Programming Online Judge".
ROT13 applies only to uppercase and lowercase English letters. Any character that is not a letter stays exactly as it is. For example, encrypting "One is 1" with ROT13 gives "Bar vf 1".
Given a string, write a program that encrypts it with ROT13 and prints the result.
Input
The first line contains a string made up of uppercase letters, lowercase letters, spaces, and digits. The length of is at most 100.
Output
Print the result of encrypting with ROT13 on the first line.