FrancisBonnefoy @ 2020-04-04 11:32:57
a = []
a.append(input())
w = len(a[0])
for i in range(1,w):
a.append(input())
ch = '0'
cnt = 0
print(w, end=" ")
for s in a:
for c in s:
if c == ch:
cnt += 1
else:
print(cnt, end=" ")
ch = c
cnt = 1
print(cnt, end=" ")
别再嘲笑想用洛谷练习python的人了好吗!
by 血色黄昏 @ 2020-04-04 11:33:36
这难道不是你谷特性么
by _SkyBlue @ 2020-04-04 12:32:51
@血色黄昏 stO
by 血色黄昏 @ 2020-04-04 13:34:43
@permanent ...
by AMIRIOX無暝 @ 2020-04-04 21:52:30
我都是TLE和WA,自己跑也没问题(C++),可能是Linux和Windows换行符的锅,等我有钱了一定换个1T的硬盘装个Ubuntu意思就是这辈子不会换硬盘了 我实在tq(穷)l
by AMIRIOX無暝 @ 2020-04-04 22:10:39
我过啦,果然是'\n'
的锅
by FrancisBonnefoy @ 2020-04-05 10:20:42
后记:我翻译成C++跑了一遍果然一下就过了,洛谷真的是C++的主场啊……
by ZhouTan @ 2020-07-15 19:41:33
一样……用python写完,5个WA,5个RE。