wykun1234 @ 2021-03-11 20:14:19
a=input()
l=len(a)
arr=[]
for i in a:
arr.append(i)
for i in range(l-1):
b=input()
for j in b:
arr.append(j)
print(l,end=" ")
t=1
for i in range(len(arr)-1):
if arr[i]==arr[i+1]:
t+=1
else:
print(t,end=" ")
t=1
print(t)
by lyrzs @ 2021-03-16 20:10:15
是py效率低的问题吗?
by Finleek @ 2021-08-12 23:56:25
你是怎么解决不确定输入行数的多行输入问题的?