题解 | #密码游戏#

密码游戏

https://www.nowcoder.com/practice/36641ab168664384aff798ba7ce34bc1

x=input()
x=[int(i) for i in x]
for i in range(0,4):
    x[i]=(x[i]+3)%9
x[0],x[2]=x[2],x[0]
x[1],x[3]=x[3],x[1]
x=[str(i) for i in x]
print(x[0]+x[1]+x[2]+x[3])

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务