#82Easy
Swap case
Time: 1 s · Memory: 256 MB
- Strings
Statement
You are given a string. Replace every lowercase Latin letter with its uppercase form and every uppercase letter with its lowercase form. Other characters stay the same.
Input format
A single line — a string of to ASCII characters (codes –: letters, digits, punctuation and spaces).
Output format
The changed string.
Examples
Input
Hello, World!
Output
hELLO, wORLD!
Input
binary.UZ 2026
Output
BINARY.uz 2026
Note
In the ASCII table the codes of an uppercase and a lowercase letter differ by : 'a' - 'A' = 32. Ready-made functions exist too: Python — upper() / lower(), C++ — toupper / tolower. In the first example: hELLO, wORLD!.
