求助大佬,部分RE
查看原帖
求助大佬,部分RE
218851
jinqin01楼主2023/6/30 09:18

求助大佬!!为什么有几个测试点会RE啊,下载在电脑上运行结果是对的

str = input()
ans = [0]*3
i = 0
while i < len(str):
    if str[i + 3].isnumeric():
        ans[ord(str[i]) - ord('a')] = int(str[i + 3]) - 0
    else:
        ans[ord(str[i]) - ord('a')] = ans[ord(str[i + 3]) - ord('a')]
    i += 5
print(ans[0], ans[1], ans[2])
2023/6/30 09:18
加载中...