题解 | 密码游戏

密码游戏

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

秒了

l = list(map(int,input()))
for i in range(4):
    l[i] = (l[i]+3)%9
for i in range(2):
    l[i],l[i+2] = l[i+2],l[i]
print("".join(map(str,l)))

全部评论

相关推荐

评论
1
收藏
分享

创作者周榜

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