python 求助!
查看原帖
python 求助!
846756
over2004212楼主2023/8/16 01:56
s=input()
S=""
for i in range(len(s)):
    #if "0">s[i] and s[i]>"9":
    if ord("A")<=ord(s[i])<=ord("Z") or ord("a")<=ord(s[i])<=ord("z"):    
        if "0"<s[i+1]<"9":
            S=S+s[i]*int(s[i+1])
            #print(s[i]*int(s[i+1]),end='')
        else:
            S=S+s[i]
            #print(s[i],end='')
            continue
if(len(S)<=100):
    print(S)
else:
    print(S[0:100])

蒟蒻在线求助 为什么只有20分555555

2023/8/16 01:56
加载中...