pythonchallenge第二关
程序员文章站
2024-02-12 17:37:34
...
http://www.pythonchallenge.com/pc/def/map.html
作为第二关给出了一个提示
K->M
O->Q
E->G
g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj.
上代码:
得出map偏移后的值为OCR
得出下关地址:
http://www.pythonchallenge.com/pc/def/ocr.html
作为第二关给出了一个提示
K->M
O->Q
E->G
g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj.
上代码:
str1="""g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp.
bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle
qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj."""
str2="abcdefghijklmnopqrstuvwxyz"
str3="cdefghijklmnopqrstuvwxyzab"
from string import maketrans
print str1.translate(maketrans(str2,str3))
print "map".translate(maketrans(str2,str3))
得出map偏移后的值为OCR
得出下关地址:
http://www.pythonchallenge.com/pc/def/ocr.html
上一篇: php采集csdn首页新闻_PHP教程
下一篇: PHP数组取值有关问题