题解 | #密码游戏#
密码游戏
https://www.nowcoder.com/practice/36641ab168664384aff798ba7ce34bc1
a = int(input()) b = [] for i in range(4): b.append((a//(10**(3-i)))%10) for j in range(4): b[j] = (b[j]+3)%9 b[0],b[2] = b[2],b[0] b[1],b[3] = b[3],b[1] print(b[0],b[1],b[2],b[3],sep='')