注意对于000123,它的位置应当是1所处位置
000123
1
s=input() maxn=0 t=0 for i in range(len(s)): if '0'<=s[i]<='9': tmp=i while i<len(s) and '0'<=s[i]<='9': i+=1 tt=int(s[tmp:i]) if maxn<tt: maxn=tt t=tmp while t<len(s) and s[t]=='0': t+=1 print(t+1)
注册一个 TZHSOJ 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 TZHSOJ 通用账户