Problem 49
Toggle Case
Easy · 10 pts · String
Problem
You are given a string of English letters with no spaces. Change every lowercase letter to uppercase and every uppercase letter to lowercase, and print the result. In ASCII, a lowercase letter and its uppercase form differ by exactly 32 (for example 'a' is 97 and 'A' is 65), so toggling the case can be done by adding or subtracting 32, or with your language's case functions.
Input
A single string S of English letters (no spaces).
Output
Print the toggled string.
Constraints
1 <= |S| <= 100000
Example input
Hello
Example output
hELLO
Explanation
In "Hello", the uppercase H becomes h and the lowercase e, l, l, o become E, L, L, O. The result is hELLO.