059. Multiply Characters

Codeforces
IDCF10269059
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
Take a single String as input, and output the same string after repeating certain characters by a certain number. The character 'h' should be repeated 5 times, the character 'c' should be repeated 2 times, and the character 'z' should be repeated 12 times. A single string S containing the string to be modified. A single string S after being modified. All test cases will be completely lowercase. ## Input A single string S containing the string to be modified. ## Output A single string S after being modified. [samples] ## Note All test cases will be completely lowercase.
**Definitions** Let $ S \in \{a, b, \dots, z\}^* $ be the input string. **Transformation Rules** For each character $ c \in S $: - If $ c = \text{'h'} $, replace it with $ \text{'h'}^5 $ - If $ c = \text{'c'} $, replace it with $ \text{'c'}^2 $ - If $ c = \text{'z'} $, replace it with $ \text{'z'}^{12} $ - Otherwise, leave $ c $ unchanged **Objective** Output the string $ S' $, where each character in $ S $ is replaced according to the above rules.
API Response (JSON)
{
  "problem": {
    "name": "059. Multiply Characters",
    "description": {
      "content": "Take a single String as input, and output the same string after repeating certain characters by a certain number. The character 'h' should be repeated 5 times, the character 'c' should be repeated 2 t",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269059"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Take a single String as input, and output the same string after repeating certain characters by a certain number. The character 'h' should be repeated 5 times, the character 'c' should be repeated 2 t...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ S \\in \\{a, b, \\dots, z\\}^* $ be the input string.  \n\n**Transformation Rules**  \nFor each character $ c \\in S $:  \n- If $ c = \\text{'h'} $, replace it with $ \\text{'h'}^5 $  \n- ...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments