题解 | #密码游戏#
密码游戏
https://www.nowcoder.com/practice/36641ab168664384aff798ba7ce34bc1
a = int(input())
b=0
c = [100,1000,1,10]
for i in range(4):
b =b + (a % 10 +3) % 9 * c[i]
a //=10
print("{:04d}".format(b))
密码游戏
https://www.nowcoder.com/practice/36641ab168664384aff798ba7ce34bc1
a = int(input())
b=0
c = [100,1000,1,10]
for i in range(4):
b =b + (a % 10 +3) % 9 * c[i]
a //=10
print("{:04d}".format(b))
相关推荐