zoukankan      html  css  js  c++  java
  • pythonchallenge1

    先贴代码:

    import string
    str = r"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."
    
    table = string.maketrans('abcdefghijklmnopqrstuvwxyz','cdefghijklmnopqrstuvwxyzab')
    print(str.translate(table))

    主要是看懂题目,我没看出来,借鉴别人的。

    题目是简单的加密,属于移位加密,字母模右移两位,采用str的translate即可

    解密内容为:

    i hope you didnt translate it by hand. thats what computers are for. doing it in by hand is inefficient and that's why this text is so long. using string.maketrans() is recommended. now apply on the url.

    应用上述的map,所以下一题的url是:http://www.pythonchallenge.com/pc/def/ocr.html

  • 相关阅读:
    调试与分析
    GCC
    汇编
    数据恢复
    TCP/IP
    shell
    vmstat、top
    计算程序运行时间的封装
    protobuf
    c++模板
  • 原文地址:https://www.cnblogs.com/arbboter/p/4225247.html
Copyright © 2011-2022 走看看