求助各位大佬!为什么会RE(python实现)
查看原帖
求助各位大佬!为什么会RE(python实现)
277543
Rammer楼主2022/4/19 17:55

只有20分,其他点全部是re

x = input()
end = 0
flag = 1
for i in range(len(x)-2):
    if x[i].isdecimal():
        end += flag * int(x[i])
        flag += 1
    continue
code = end % 11
if code==int(x[-1]):
    print("Right")
elif code==10:
    print(x[:-1] + X)
else:
    print(x[:-1] + str(code))
2022/4/19 17:55
加载中...