题解 | #密码游戏#
密码游戏
https://www.nowcoder.com/practice/36641ab168664384aff798ba7ce34bc1
num = input()
b = []
for n in num:
x = (int(n)+3)%9
b.append(x)
b[0], b[2] = b[2], b[0]
b[1], b[3] = b[3], b[1]
for i in b:
print(i, end="")
密码游戏
https://www.nowcoder.com/practice/36641ab168664384aff798ba7ce34bc1
num = input()
b = []
for n in num:
x = (int(n)+3)%9
b.append(x)
b[0], b[2] = b[2], b[0]
b[1], b[3] = b[3], b[1]
for i in b:
print(i, end="")
相关推荐