058. Switch Case

Codeforces
IDCF10269058
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
Take a single string S as input, then make all capital characters lowercase and all lowercase characters capital. A single string S containing the string to switch. The string S after being switched. The string will not contain spaces or non-alphabetic characters. ## Input A single string S containing the string to switch. ## Output The string S after being switched. [samples] ## Note The string will not contain spaces or non-alphabetic characters.
**Definitions** Let $ S \in \Sigma^* $ be the input string, where $ \Sigma = \{a, b, \dots, z, A, B, \dots, Z\} $. **Objective** Compute the string $ S' $ such that for each character $ c \in S $: $$ c' = \begin{cases} \text{lowercase}(c) & \text{if } c \text{ is uppercase}, \\ \text{uppercase}(c) & \text{if } c \text{ is lowercase}. \end{cases} $$ Output $ S' $.
API Response (JSON)
{
  "problem": {
    "name": "058. Switch Case",
    "description": {
      "content": "Take a single string S as input, then make all capital characters lowercase and all lowercase characters capital. A single string S containing the string to switch. The string S after being switched",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269058"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Take a single string S as input, then make all capital characters lowercase and all lowercase characters capital.\n\nA single string S containing the string to switch.\n\nThe string S after being switched...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ S \\in \\Sigma^* $ be the input string, where $ \\Sigma = \\{a, b, \\dots, z, A, B, \\dots, Z\\} $.\n\n**Objective**  \nCompute the string $ S' $ such that for each character $ c \\in S $...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments