题解 | #密码游戏#
密码游戏
https://www.nowcoder.com/practice/36641ab168664384aff798ba7ce34bc1
x = int(input()) x1 = x//1000 x2 = x//100-x1*10 x3 = x//10- x//100*10 x4 = x%10 x11 = (x1+3)%9 x22 = (x2+3)%9 x33 = (x3+3)%9 x44 = (x4+3)%9 print(x33,x44,x11,x22,sep="")