#
# 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
#
# 进行凯撒解密
# @param password string字符串 旺仔哥哥的密码
# @param n int整型 每个字符加密过程中错位的次数
# @return string字符串
#
class Solution:
def decodeWangzai(self , password: str, n: int) -> str:
# write code here
l=[]
for j in password:
ch=ord(j)
ch=ch-n%26
if ch<97:
ch=ch+26
l.append(chr(ch))
return ''.join(l)

京公网安备 11010502036488号