Problems > Swap the Case

Swap the Case

Difficulty: 800 2000 ms 128 MB

implementation strings

Swap the case of every letter: lowercase becomes uppercase and vice versa.

Input: one line with a string S of English letters.

Output: S with every letter's case swapped.

Constraints:

  • 1 ≤ |S| ≤ 104
  • S contains English letters only

Sample Tests

Input 1
HeLLo
Output 1
hEllO
Input 2
abc
Output 2
ABC

Read the Editorial

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.