字符串 p 型编码

Luogu
IDLGB2123
Time1000ms
Memory128MB
DifficultyP1
字符串(入门)
给定一个完全由数字字符('0','1','2',…,'9')构成的字符串 str ,请写出 str 的 p 型编码串。例如:字符串 `122344111` 可被描述为 `1个1、2个2、1个3、2个4、3个1` ,因此我们说`122344111` 的 p 型编码串为 `1122132431` ;类似的道理,编码串 `101` 可以用来描述 `1111111111` ;`00000000000` 可描述为 `11个0`,因此它的p型编码串即为 `110` ;`100200300` 可描述为 `1个1、2个 0、1个2、2个0、1个3、2个0`,因此它的 p 型编码串为 `112012201320`。 ## Input 输入仅一行,包含字符串 str。每一行字符串最多包含 $1000$ 个数字字符。 ## Output 输出该字符串对应的 $p$ 型编码串。 [samples]
Samples
Input #1
122344111
Output #1
1122132431
API Response (JSON)
{
  "problem": {
    "name": "字符串 p 型编码",
    "description": {
      "content": "给定一个完全由数字字符('0','1','2',…,'9')构成的字符串 str ,请写出 str 的 p 型编码串。例如:字符串 `122344111` 可被描述为 `1个1、2个2、1个3、2个4、3个1` ,因此我们说`122344111` 的 p 型编码串为 `1122132431` ;类似的道理,编码串 `101` 可以用来描述 `1111111111` ;`00000000000` 可",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 131072
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB2123"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "给定一个完全由数字字符('0','1','2',…,'9')构成的字符串 str ,请写出 str 的 p 型编码串。例如:字符串 `122344111` 可被描述为 `1个1、2个2、1个3、2个4、3个1` ,因此我们说`122344111` 的 p 型编码串为 `1122132431` ;类似的道理,编码串 `101` 可以用来描述 `1111111111` ;`00000000000` 可...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments