题解 | #密码游戏#
密码游戏
https://www.nowcoder.com/practice/36641ab168664384aff798ba7ce34bc1
data = input() t_data = (int(data) // 1000) h_data = ((int(data) // 100) % 10) s_data = ((int(data) //10) % 10) g_data = (int(data) % 10) arr = [t_data , h_data , s_data , g_data] for i in range(len(arr)): arr[i] = (arr[i] + 3) % 9 print(arr[2],arr[3],arr[0],arr[1],sep='')