A. 字符串p型编码

    Type: Default 1000ms 256MiB

字符串p型编码

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

问题描述

给定一个完全由数字字符(‘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。

输入

输入仅一行,包含字符串str。每一行字符串最多包含1000个数字字符。

输出

输出该字符串对应的p型编码串。

样例

122344111
1122132431

Limitation

1s, 1024KiB for each test case.

假期基础训练(第三周)

Not Claimed
Status
Done
Problem
6
Open Since
2025-7-20 0:00
Deadline
2025-8-15 23:59
Extension
24 hour(s)