zoukankan      html  css  js  c++  java
  • pythonchallenge关卡破解

    第一关:pow(2,38)

    第二关:

    1 import string
    2 table = str.maketrans(string.ascii_lowercase, string.ascii_lowercase[2:] + string.ascii_lowercase[:2])  #向右移动两位
    3 s="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. "
    4 print(s.translate(table))

    运行后结果: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.

    第三关:

    import re
    s='''     '''
    rule = re.compile('[a-zA-Z]')
    result=rule.findall(s)
    print(result)

    第四关:

    import re
    s='''    '''    
    rule = re.compile('[^A-Z][A-Z][A-Z][A-Z]([a-z])[A-Z][A-Z][A-Z][^A-Z]')
    result=rule.findall(s)
    print(result)

    第五关:

  • 相关阅读:
    浅谈单调栈、单调队列
    关于博客迁移
    高二四班抽号
    数据结构
    图论
    洛谷 P3817 小A的糖果
    洛谷 P4016 负载平衡问题
    洛谷 P4306 [JSOI2010]连通数
    洛谷 P4822 [BJWC2012]冻结
    洛谷 P4568 [JLOI2011]飞行路线
  • 原文地址:https://www.cnblogs.com/xiaomen/p/5055506.html
Copyright © 2011-2022 走看看