問題一覧 > 通常問題

No.163 cAPSlOCK

レベル : / 実行時間制限 : 1ケース 5.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 1294
作問者 : yuki2006
お気に入りにしたユーザー ProblemId : 339 / 自分の提出
問題文最終更新日: 2026-06-27 10:06:49
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 91 (順位表) の他の問題:

Problem Statement

Zelda set a password on her PC yesterday.

Today, she started up the PC and noticed that the password she entered yesterday does not let her in.
Thinking it over carefully, it seems she typed it with the Caps Lock feature on without noticing.
Apparently she did not notice while typing because the characters are hidden and displayed as *.

The password uses only the 52 kinds of half-width alphabet letters, uppercase and lowercase.
Caps Lock is a feature that makes typed letters be entered as uppercase if a lowercase letter is typed, and as lowercase if an uppercase letter is typed.

Given the string of the password she believes she entered yesterday,
find the "current" password that was mistakenly set.

Input

S

$S$ is given as a string consisting of the 52 kinds of half-width alphabet letters, lowercase or uppercase.
$1 \le |S| \le 100$

Output

Find the current password that was mistakenly set.
Print a newline at the end.

Sample

Sample 1
Input
CapsLock
Output
cAPSlOCK

Typing CapsLock with Caps Lock on gives this result.
The fact that the very reason for this key's existence is in question must not be touched upon, owing to the powers of darkness.

Incidentally, on a Mac, pressing Shift does not make letters lowercase.

Sample 2
Input
ABCdef
Output
abcDEF

Sample 3
Input
A
Output
a

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。