如题
在字符串中找出连续最长的数字串
http://www.nowcoder.com/questionTerminal/2c81f88ecd5a4cc395b5308a99afbbec
while True:
try:
s=input() for i in s: if i.isdigit()==False: s=s.replace(i," ") s=s.split() r1=max([len(i) for i in s]) r2="" for i in s: if len(i)==r1: r2+=i print(r2+","+str(r1)) except: break