python 对6错 死都无法找出原因

a = []
b = []
c = []
which = 'c'

n = int(input())
x = input()
y = input()
z = input()

for i in range(0, n):
a.append(ord(x[i])-96)
b.append(ord(y[i])-96)
c.append(ord(z[i])-96)

temp = c[::-1]
for i in range(0,n):
if (a[i] + b[i] - 2*temp[i]) % 26 != 0:
which = 'a'
break

temp = a[::-1]
for i in range(0,n):
if (b[i] + c[i] - 2*temp[i]) % 26 != 0:
which = 'b'
break

if which == 'a':
print(x[::-1])
if which == 'b':
print(y[::-1])
if which == 'c':
print(z[::-1])

0 条评论

目前还没有评论...

信息

ID
1449
难度
6
分类
字符串 | 模拟 点击显示
标签
递交数
6972
已通过
1867
通过率
27%
被复制
9
上传者