1 条题解
-
0曾经的我 (zengzhiyuan) LV 9 @ 2023-1-1 21:10:41
AC代码
text = input() last_word = '' n = 0 t = '' for i in text: if last_word == '': last_word = i n += 1 continue else: if i == last_word: n += 1 else: t = t + str(n) + last_word last_word = i n = 1 t = t + str(n) + last_word print(t)
- 1
信息
- ID
- 1383
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 8
- 标签
- 递交数
- 14
- 已通过
- 9
- 上传者