第0关:http://www.pythonchallenge.com/pc/def/0.html
线索:试着改变URL的地址-->把图片中得到的数字输入到URL中
2**38
输出:
274877906944
第1关:http://www.pythonchallenge.com/pc/def/274877906944.html
线索:想要解开它,你需要想2次--> K-M,O-Q,E-G 每个字母都往后推了2次
def transmes(mes): intab = 'abcdefghijklmnopqrstuvwxyz' outtab ='cdefghijklmnopqrstuvwxyzab' trantab = str.maketrans(intab,outtab) message = mes.translate(trantab) print(message) message = "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." transmes(message) url = 'map' transmes(url)
输出:
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.
希望你没有一个一个去推算字母解密这段话,这样的工作应该是由电脑来做。手动推送很费时,所以这段话会如此之长。推荐用 string.maketrans() 方法来解密这道题,现在把它应用在url上。
ocr
第2关:http://www.pythonchallenge.com/pc/def/ocr.html
线索:找出字母。他们可能在书中,可能在页面源码上。-->查看源代码,看注释,在下面这堆乱七八糟的信息中,找到出现次数最少的字母
page_source = '''%%$@_$^__#....... ''' #内容太长,已省略 def count_char(mes): infos = {} for i in mes: if i.isalpha(): if i not in infos: infos[i] = 0 infos[i] += 1 a = sorted(infos.items(),key = lambda item:item[1])[0:10] print(a) count_char(page_source)
输出:
[('e', 1), ('q', 1), ('u', 1), ('a', 1), ('l', 1), ('i', 1), ('t', 1), ('y', 1)]
第3关:http://www.pythonchallenge.com/pc/def/equality.html
线索:一个小写字母的两边准确地被3个大写字母包围 --> 那么它的格式就是 xXXXxXXXx
mes = '''kAewtloY.......piqBd ''' #由于内容很长,已省略 import re pattern = r'[a-z][A-Z]{3}[a-z][A-Z]{3}[a-z]' for i in re.findall(pattern,mes): print(i[4],end='')
输出:
linkedlist
第4关:http://www.pythonchallenge.com/pc/def/linkedlist.php
线索:打开源代码,注释中 --> urllib 可能有帮助。千万不要把所有的 NOTHING 都试一遍,因为它不会停,400 次完全够了
import requests import re from bs4 import BeautifulSoup url = 'http://www.pythonchallenge.com/pc/def/linkedlist.php' data = requests.get(url) soup = BeautifulSoup(data.text,'lxml') href = soup.a['href'] p = re.search(r'(d)+$',href).group() i = 0 while(True): next_url = url + '?nothing=' + str(p) next_page = requests.get(next_url).text print(str(i)+":"+ next_page,p) if re.search(r'two',next_page): p =int(p)/2 elif (re.search(r'(d)+$',next_page)): p = re.search(r'(d)+$',next_page).group() else: break i += 1
输出:
0:and the next nothing is 44827 12345 1:and the next nothing is 45439 44827 2:<font color=red>Your hands are getting tired </font>and the next nothing is 94485 45439 3:and the next nothing is 72198 94485 4:and the next nothing is 80992 72198 5:and the next nothing is 8880 80992 6:and the next nothing is 40961 8880 7:and the next nothing is 58765 40961 8:and the next nothing is 46561 58765 9:and the next nothing is 13418 46561 10:and the next nothing is 41954 13418 11:and the next nothing is 46782 41954 12:and the next nothing is 92730 46782 13:and the next nothing is 89229 92730 14:and the next nothing is 25646 89229 15:and the next nothing is 74288 25646 16:and the next nothing is 25945 74288 17:and the next nothing is 39876 25945 18:and the next nothing is 8498 39876 19:and the next nothing is 34684 8498 20:and the next nothing is 62316 34684 21:and the next nothing is 71331 62316 22:and the next nothing is 59717 71331 23:and the next nothing is 76893 59717 24:and the next nothing is 44091 76893 25:and the next nothing is 73241 44091 26:and the next nothing is 19242 73241 27:and the next nothing is 17476 19242 28:and the next nothing is 39566 17476 29:and the next nothing is 81293 39566 30:and the next nothing is 25857 81293 31:and the next nothing is 74343 25857 32:and the next nothing is 39410 74343 33:and the next nothing is 5505 39410 34:and the next nothing is 27104 5505 35:and the next nothing is 54003 27104 36:and the next nothing is 23501 54003 37:and the next nothing is 21110 23501 38:and the next nothing is 88399 21110 39:and the next nothing is 49740 88399 40:and the next nothing is 31552 49740 41:and the next nothing is 39998 31552 42:and the next nothing is 19755 39998 43:and the next nothing is 64624 19755 44:and the next nothing is 37817 64624 45:and the next nothing is 43427 37817 46:and the next nothing is 15115 43427 47:and the next nothing is 44327 15115 48:and the next nothing is 7715 44327 49:and the next nothing is 15248 7715 50:and the next nothing is 61895 15248 51:and the next nothing is 54759 61895 52:and the next nothing is 54270 54759 53:and the next nothing is 51332 54270 54:and the next nothing is 63481 51332 55:and the next nothing is 12362 63481 56:and the next nothing is 94476 12362 57:and the next nothing is 87810 94476 58:and the next nothing is 6027 87810 59:and the next nothing is 47551 6027 60:and the next nothing is 79498 47551 61:and the next nothing is 81226 79498 62:and the next nothing is 4256 81226 63:and the next nothing is 62734 4256 64:and the next nothing is 25666 62734 65:and the next nothing is 14781 25666 66:and the next nothing is 21412 14781 67:and the next nothing is 55205 21412 68:and the next nothing is 65516 55205 69:and the next nothing is 53535 65516 70:and the next nothing is 4437 53535 71:and the next nothing is 43442 4437 72:and the next nothing is 91308 43442 73:and the next nothing is 1312 91308 74:and the next nothing is 36268 1312 75:and the next nothing is 34289 36268 76:and the next nothing is 46384 34289 77:and the next nothing is 18097 46384 78:and the next nothing is 9401 18097 79:and the next nothing is 54249 9401 80:and the next nothing is 29247 54249 81:and the next nothing is 13115 29247 82:and the next nothing is 23053 13115 83:and the next nothing is 3875 23053 84:and the next nothing is 16044 3875 85:Yes. Divide by two and keep going. 16044 86:and the next nothing is 25357 8022.0 87:and the next nothing is 89879 25357 88:and the next nothing is 80119 89879 89:and the next nothing is 50290 80119 90:and the next nothing is 9297 50290 91:and the next nothing is 30571 9297 92:and the next nothing is 7414 30571 93:and the next nothing is 30978 7414 94:and the next nothing is 16408 30978 95:and the next nothing is 80109 16408 96:and the next nothing is 55736 80109 97:and the next nothing is 15357 55736 98:and the next nothing is 80887 15357 99:and the next nothing is 35014 80887 100:and the next nothing is 16523 35014 101:and the next nothing is 50286 16523 102:and the next nothing is 34813 50286 103:and the next nothing is 77562 34813 104:and the next nothing is 54746 77562 105:and the next nothing is 22680 54746 106:and the next nothing is 19705 22680 107:and the next nothing is 77000 19705 108:and the next nothing is 27634 77000 109:and the next nothing is 21008 27634 110:and the next nothing is 64994 21008 111:and the next nothing is 66109 64994 112:and the next nothing is 37855 66109 113:and the next nothing is 36383 37855 114:and the next nothing is 68548 36383 115:and the next nothing is 96070 68548 116:and the next nothing is 83051 96070 117:and the next nothing is 58026 83051 118:and the next nothing is 44726 58026 119:and the next nothing is 35748 44726 120:and the next nothing is 61287 35748 121:and the next nothing is 559 61287 122:and the next nothing is 81318 559 123:and the next nothing is 50443 81318 124:and the next nothing is 1570 50443 125:and the next nothing is 75244 1570 126:and the next nothing is 56265 75244 127:and the next nothing is 17694 56265 128:and the next nothing is 48033 17694 129:and the next nothing is 56523 48033 130:and the next nothing is 51253 56523 131:and the next nothing is 85750 51253 132:and the next nothing is 42760 85750 133:and the next nothing is 11877 42760 134:and the next nothing is 15962 11877 135:and the next nothing is 75494 15962 136:and the next nothing is 87283 75494 137:and the next nothing is 40396 87283 138:and the next nothing is 49574 40396 139:and the next nothing is 82682 49574 140:There maybe misleading numbers in the text. One example is 82683. Look only for the next nothing and the next nothing is 63579 82682 141:and the next nothing is 37278 63579 142:and the next nothing is 53548 37278 143:and the next nothing is 66081 53548 144:and the next nothing is 67753 66081 145:and the next nothing is 56337 67753 146:and the next nothing is 3356 56337 147:and the next nothing is 94525 3356 148:and the next nothing is 89574 94525 149:and the next nothing is 4413 89574 150:and the next nothing is 82294 4413 151:and the next nothing is 56060 82294 152:and the next nothing is 95493 56060 153:and the next nothing is 80865 95493 154:and the next nothing is 66242 80865 155:and the next nothing is 16065 66242 156:and the next nothing is 62145 16065 157:and the next nothing is 23147 62145 158:and the next nothing is 83763 23147 159:and the next nothing is 62381 83763 160:and the next nothing is 76841 62381 161:and the next nothing is 91706 76841 162:and the next nothing is 9268 91706 163:and the next nothing is 64814 9268 164:and the next nothing is 80809 64814 165:and the next nothing is 14039 80809 166:and the next nothing is 73355 14039 167:and the next nothing is 81905 73355 168:and the next nothing is 36402 81905 169:and the next nothing is 27221 36402 170:and the next nothing is 79607 27221 171:and the next nothing is 91763 79607 172:and the next nothing is 11631 91763 173:and the next nothing is 76396 11631 174:and the next nothing is 69905 76396 175:and the next nothing is 11073 69905 176:and the next nothing is 71281 11073 177:and the next nothing is 54345 71281 178:and the next nothing is 19047 54345 179:and the next nothing is 34376 19047 180:and the next nothing is 3193 34376 181:and the next nothing is 74258 3193 182:and the next nothing is 62712 74258 183:and the next nothing is 1823 62712 184:and the next nothing is 21232 1823 185:and the next nothing is 87890 21232 186:and the next nothing is 21545 87890 187:and the next nothing is 37136 21545 188:and the next nothing is 23060 37136 189:and the next nothing is 5385 23060 190:and the next nothing is 4620 5385 191:and the next nothing is 39111 4620 192:and the next nothing is 35914 39111 193:and the next nothing is 60310 35914 194:and the next nothing is 19178 60310 195:and the next nothing is 44671 19178 196:and the next nothing is 45736 44671 197:and the next nothing is 9216 45736 198:and the next nothing is 12585 9216 199:and the next nothing is 11302 12585 200:and the next nothing is 33096 11302 201:and the next nothing is 13967 33096 202:and the next nothing is 57004 13967 203:and the next nothing is 64196 57004 204:and the next nothing is 73929 64196 205:and the next nothing is 24800 73929 206:and the next nothing is 25081 24800 207:and the next nothing is 90033 25081 208:and the next nothing is 45919 90033 209:and the next nothing is 54827 45919 210:and the next nothing is 73950 54827 211:and the next nothing is 56978 73950 212:and the next nothing is 8133 56978 213:and the next nothing is 61900 8133 214:and the next nothing is 47769 61900 215:and the next nothing is 631 47769 216:and the next nothing is 2284 631 217:and the next nothing is 60074 2284 218:and the next nothing is 35959 60074 219:and the next nothing is 57158 35959 220:and the next nothing is 90990 57158 221:and the next nothing is 27935 90990 222:and the next nothing is 99927 27935 223:and the next nothing is 41785 99927 224:and the next nothing is 32660 41785 225:and the next nothing is 4328 32660 226:and the next nothing is 42067 4328 227:and the next nothing is 8743 42067 228:and the next nothing is 38613 8743 229:and the next nothing is 21100 38613 230:and the next nothing is 77864 21100 231:and the next nothing is 6523 77864 232:and the next nothing is 6927 6523 233:and the next nothing is 82930 6927 234:and the next nothing is 35846 82930 235:and the next nothing is 31785 35846 236:and the next nothing is 41846 31785 237:and the next nothing is 72387 41846 238:and the next nothing is 59334 72387 239:and the next nothing is 65520 59334 240:and the next nothing is 93781 65520 241:and the next nothing is 55840 93781 242:and the next nothing is 80842 55840 243:and the next nothing is 59022 80842 244:and the next nothing is 23298 59022 245:and the next nothing is 27709 23298 246:and the next nothing is 96791 27709 247:and the next nothing is 75635 96791 248:and the next nothing is 52899 75635 249:and the next nothing is 66831 52899 250:peak.html 66831
第5关:http://www.pythonchallenge.com/pc/def/peak.html
线索:读出来 --> 打开源代码,peak hell 听起熟悉吗?,像 pickle。看到 <peakhell src="banner.p"/> , 点击它得到一大段bytes
类型的信息
import requests import pickle url = 'http://www.pythonchallenge.com/pc/def/banner.p' data = requests.get(url).text #字符串类型,在最新的Python 3版本中,字符串是以Unicode编码的 bytes_data = data.encode('utf-8') # 字符串转化为 bytes 类型 或者 bytes_data = data.encode('ascii') print(bytes_data) print(type(bytes_data)) pdata = pickle.loads(bytes_data) # loads 方法需要是 bytes 类型,即二进制数据 for i in pdata: print('') for x in i: print(x[0]*x[1],end='')
输出:
##### ##### #### #### #### #### #### #### #### #### #### #### #### #### #### #### ### #### ### ### ##### ### ##### ### ### #### ### ## #### ####### ## ### #### ####### #### ####### ### ### #### ### ### ##### #### ### #### ##### #### ##### #### ### ### #### ### #### #### ### ### #### #### #### #### ### #### #### ### #### #### ### #### #### #### #### ### ### #### #### #### #### ## ### #### #### #### #### #### ### #### #### #### #### ########## #### #### #### #### ############## #### #### #### #### ### #### #### #### #### #### #### #### #### #### #### #### ### #### #### #### #### #### #### ### #### #### #### ### #### #### #### #### ### #### ### ## #### #### ### #### #### #### #### #### ### ## #### ### ## #### #### ########### #### #### #### #### ### ## #### ### ###### ##### ## #### ###### ########### ##### ### ######
第6关:http://www.pythonchallenge.com/pc/def/channel.html
线索:打开源代码,第一段注释中有个zip,第二段注释和本谜题无关。把zip替代url中的html,获取到一个zip文件
#解压 E:桌面图片channel.zip 文件到当前目录 PyCha6-zipfiles 下面 import zipfile,os,re f = zipfile.ZipFile(r'E:桌面图片channel.zip','r') for file in f.namelist(): f.extract(file,r'PC6zipfiles') f.close() #读取解压后目录下所有文件内容 comments = [] for i in os.listdir('PC6zipfiles'): if i == 'readme.txt': with open(os.path.join(os.getcwd(),'PC6zipfiles',i),'r') as txt: readme = txt.read() print(readme) hint = re.search(r'(d){2,5}',readme).group() print(hint) comments.append(f.getinfo('%s.txt'%hint).comment) while True: for a in os.listdir('PC6zipfiles'): if a == '%s.txt' % hint: with open(os.path.join(os.getcwd(),'PC6zipfiles',a),'r') as text: nothing = text.read() print(nothing,hint) if re.search(r'(d){2,5}',nothing).group(): hint = re.search(r'(d){2,5}',nothing).group() comments.append(f.getinfo('%s.txt'%hint).comment)
输出:
welcome to my zipped list. hint1: start from 90052 hint2: answer is inside the zip 90052 Next nothing is 94191 90052 Next nothing is 85503 94191 Next nothing is 70877 85503 Next nothing is 15409 70877 Next nothing is 60838 15409 Next nothing is 80009 60838 Next nothing is 21347 80009 Next nothing is 24164 21347 Next nothing is 13836 24164 Next nothing is 80123 13836 Next nothing is 92453 80123 Next nothing is 69556 92453 Next nothing is 31491 69556 Next nothing is 13371 31491 Next nothing is 88143 13371 Next nothing is 82593 88143 Next nothing is 30645 82593 Next nothing is 88985 30645 Next nothing is 27190 88985 Next nothing is 24448 27190 Next nothing is 37468 24448 Next nothing is 49892 37468 Next nothing is 54714 49892 Next nothing is 75161 54714 Next nothing is 893 75161 Next nothing is 57882 893 Next nothing is 40033 57882 Next nothing is 29521 40033 Next nothing is 5289 29521 Next nothing is 4701 5289 Next nothing is 32742 4701 Next nothing is 18751 32742 Next nothing is 68586 18751 Next nothing is 53984 68586 Next nothing is 52184 53984 Next nothing is 43807 52184 Next nothing is 56300 43807 Next nothing is 97649 56300 Next nothing is 88244 97649 Next nothing is 91669 88244 Next nothing is 88394 91669 Next nothing is 77575 88394 Next nothing is 70208 77575 Next nothing is 78211 70208 Next nothing is 84854 78211 Next nothing is 87594 84854 Next nothing is 26234 87594 Next nothing is 63181 26234 Next nothing is 68559 63181 Next nothing is 37695 68559 Next nothing is 64397 37695 Next nothing is 55356 64397 Next nothing is 8258 55356 Next nothing is 77074 8258 Next nothing is 28389 77074 Next nothing is 39983 28389 Next nothing is 40210 39983 Next nothing is 69972 40210 Next nothing is 48089 69972 Next nothing is 34764 48089 Next nothing is 46945 34764 Next nothing is 97812 46945 Next nothing is 95662 97812 Next nothing is 55220 95662 Next nothing is 86793 55220 Next nothing is 69785 86793 Next nothing is 85827 69785 Next nothing is 75722 85827 Next nothing is 37259 75722 Next nothing is 57622 37259 Next nothing is 57566 57622 Next nothing is 98181 57566 Next nothing is 57831 98181 Next nothing is 68947 57831 Next nothing is 29834 68947 Next nothing is 67060 29834 Next nothing is 48669 67060 Next nothing is 12761 48669 Next nothing is 47882 12761 Next nothing is 98339 47882 Next nothing is 9058 98339 Next nothing is 14745 9058 Next nothing is 60138 14745 Next nothing is 47842 60138 Next nothing is 71178 47842 Next nothing is 1091 71178 Next nothing is 52205 1091 Next nothing is 98709 52205 Next nothing is 4992 98709 Next nothing is 97673 4992 Next nothing is 92736 97673 Next nothing is 98119 92736 Next nothing is 97515 98119 Next nothing is 98939 97515 Next nothing is 36656 98939 Next nothing is 85839 36656 Next nothing is 33746 85839 Next nothing is 64122 33746 Next nothing is 41968 64122 Next nothing is 56617 41968 Next nothing is 83808 56617 Next nothing is 68613 83808 Next nothing is 99714 68613 Next nothing is 67196 99714 Next nothing is 11992 67196 Next nothing is 38192 11992 Next nothing is 61837 38192 Next nothing is 29034 61837 Next nothing is 77480 29034 Next nothing is 12737 77480 Next nothing is 39310 12737 Next nothing is 89307 39310 Next nothing is 36624 89307 Next nothing is 81412 36624 Next nothing is 51450 81412 Next nothing is 21690 51450 Next nothing is 46726 21690 Next nothing is 74576 46726 Next nothing is 57901 74576 Next nothing is 92043 57901 Next nothing is 78130 92043 Next nothing is 23647 78130 Next nothing is 39258 23647 Next nothing is 76629 39258 Next nothing is 48614 76629 Next nothing is 74736 48614 Next nothing is 53027 74736 Next nothing is 3713 53027 Next nothing is 30339 3713 Next nothing is 42197 30339 Next nothing is 12539 42197 Next nothing is 98095 12539 Next nothing is 176 98095 Next nothing is 64956 176 Next nothing is 78307 64956 Next nothing is 35035 78307 Next nothing is 36894 35035 Next nothing is 76017 36894 Next nothing is 67036 76017 Next nothing is 33179 67036 Next nothing is 64085 33179 Next nothing is 90506 64085 Next nothing is 94079 90506 Next nothing is 76441 94079 Next nothing is 16146 76441 Next nothing is 78399 16146 Next nothing is 98044 78399 Next nothing is 64045 98044 Next nothing is 69444 64045 Next nothing is 78862 69444 Next nothing is 51492 78862 Next nothing is 52349 51492 Next nothing is 86079 52349 Next nothing is 8001 86079 Next nothing is 68750 8001 Next nothing is 65764 68750 Next nothing is 11419 65764 Next nothing is 96644 11419 Next nothing is 63154 96644 Next nothing is 70397 63154 Next nothing is 91046 70397 Next nothing is 61274 91046 Next nothing is 50678 61274 Next nothing is 94118 50678 Next nothing is 86774 94118 Next nothing is 47673 86774 Next nothing is 90792 47673 Next nothing is 95791 90792 Next nothing is 72442 95791 Next nothing is 57730 72442 Next nothing is 79566 57730 Next nothing is 66349 79566 Next nothing is 40521 66349 Next nothing is 59808 40521 Next nothing is 14628 59808 Next nothing is 39820 14628 Next nothing is 100 39820 Next nothing is 84844 100 Next nothing is 39890 84844 Next nothing is 12930 39890 Next nothing is 97979 12930 Next nothing is 16870 97979 Next nothing is 3928 16870 Next nothing is 71245 3928 Next nothing is 8289 71245 Next nothing is 9118 8289 Next nothing is 81768 9118 Next nothing is 68242 81768 Next nothing is 65768 68242 Next nothing is 94363 65768 Next nothing is 34013 94363 Next nothing is 85632 34013 Next nothing is 82706 85632 Next nothing is 97089 82706 Next nothing is 67999 97089 Next nothing is 53542 67999 Next nothing is 68609 53542 Next nothing is 91136 68609 Next nothing is 95660 91136 Next nothing is 30395 95660 Next nothing is 19822 30395 Next nothing is 55325 19822 Next nothing is 33630 55325 Next nothing is 65277 33630 Next nothing is 34563 65277 Next nothing is 44890 34563 Next nothing is 54001 44890 Next nothing is 75838 54001 Next nothing is 83931 75838 Next nothing is 68010 83931 Next nothing is 62369 68010 Next nothing is 30318 62369 Next nothing is 79479 30318 Next nothing is 31117 79479 Next nothing is 43267 31117 Next nothing is 9623 43267 Next nothing is 46206 9623 Next nothing is 56408 46206 Next nothing is 91586 56408 Next nothing is 60171 91586 Next nothing is 21279 60171 Next nothing is 74921 21279 Next nothing is 91523 74921 Next nothing is 82519 91523 Next nothing is 40257 82519 Next nothing is 76116 40257 Next nothing is 7556 76116 Next nothing is 99775 7556 Next nothing is 74219 99775 Next nothing is 82223 74219 Next nothing is 35247 82223 Next nothing is 52390 35247 Next nothing is 89160 52390 Next nothing is 16586 89160 Next nothing is 24065 16586 Next nothing is 69983 24065 Next nothing is 55163 69983 Next nothing is 73389 55163 Next nothing is 91965 73389 Next nothing is 98094 91965 Next nothing is 11616 98094 Next nothing is 3651 11616 Next nothing is 56582 3651 Next nothing is 70915 56582 Next nothing is 16041 70915 Next nothing is 22628 16041 Next nothing is 21140 22628 Next nothing is 24595 21140 Next nothing is 2015 24595 Next nothing is 1063 2015 Next nothing is 81810 1063 Next nothing is 16744 81810 Next nothing is 63875 16744 Next nothing is 55449 63875 Next nothing is 93756 55449 Next nothing is 90763 93756 Next nothing is 92265 90763 Next nothing is 12362 92265 Next nothing is 31981 12362 Next nothing is 33177 31981 Next nothing is 64602 33177 Next nothing is 95085 64602 Next nothing is 22509 95085 Next nothing is 16043 22509 Next nothing is 75290 16043 Next nothing is 50374 75290 Next nothing is 67572 50374 Next nothing is 37055 67572 Next nothing is 77186 37055 Next nothing is 32544 77186 Next nothing is 1878 32544 Next nothing is 65126 1878 Next nothing is 72092 65126 Next nothing is 17712 72092 Next nothing is 81039 17712 Next nothing is 87476 81039 Next nothing is 18375 87476 Next nothing is 29494 18375 Next nothing is 46210 29494 Next nothing is 12351 46210 Next nothing is 11352 12351 Next nothing is 16030 11352 Next nothing is 3390 16030 Next nothing is 603 3390 Next nothing is 11827 603 Next nothing is 1123 11827 Next nothing is 3924 1123 Next nothing is 66402 3924 Next nothing is 36832 66402 Next nothing is 76131 36832 Next nothing is 51106 76131 Next nothing is 24644 51106 Next nothing is 66351 24644 Next nothing is 34515 66351 Next nothing is 3572 34515 Next nothing is 66200 3572 Next nothing is 63804 66200 Next nothing is 47248 63804 Next nothing is 4931 47248 Next nothing is 41894 4931 Next nothing is 88223 41894 Next nothing is 76945 88223 Next nothing is 18520 76945 Next nothing is 1440 18520 Next nothing is 39405 1440 Next nothing is 72571 39405 Next nothing is 4506 72571 Next nothing is 38221 4506 Next nothing is 82852 38221 Next nothing is 62826 82852 Next nothing is 24567 62826 Next nothing is 4682 24567 Next nothing is 88024 4682 Next nothing is 33791 88024 Next nothing is 29446 33791 Next nothing is 67233 29446 Next nothing is 17152 67233 Next nothing is 730 17152 Next nothing is 28928 730 Next nothing is 88004 28928 Next nothing is 65514 88004 Next nothing is 88301 65514 Next nothing is 74357 88301 Next nothing is 32837 74357 Next nothing is 59049 32837 Next nothing is 91793 59049 Next nothing is 43083 91793 Next nothing is 97338 43083 Next nothing is 22601 97338 Next nothing is 27898 22601 Next nothing is 56149 27898 Next nothing is 95637 56149 Next nothing is 39483 95637 Next nothing is 94070 39483 Next nothing is 92752 94070 Next nothing is 95205 92752 Next nothing is 73840 95205 Next nothing is 38673 73840 Next nothing is 78668 38673 Next nothing is 72782 78668 Next nothing is 50761 72782 Next nothing is 68023 50761 Next nothing is 27107 68023 Next nothing is 61416 27107 Next nothing is 18525 61416 Next nothing is 26202 18525 Next nothing is 34548 26202 Next nothing is 48464 34548 Next nothing is 18987 48464 Next nothing is 2539 18987 Next nothing is 16362 2539 Next nothing is 97400 16362 Next nothing is 35559 97400 Next nothing is 49787 35559 Next nothing is 27738 49787 Next nothing is 58043 27738 Next nothing is 65166 58043 Next nothing is 63997 65166 Next nothing is 20717 63997 Next nothing is 24530 20717 Next nothing is 21174 24530 Next nothing is 68030 21174 Next nothing is 55286 68030 Next nothing is 17904 55286 Next nothing is 86545 17904 Next nothing is 95763 86545 Next nothing is 18922 95763 Next nothing is 27319 18922 Next nothing is 61270 27319 Next nothing is 1064 61270 Next nothing is 8424 1064 Next nothing is 59672 8424 Next nothing is 51066 59672 Next nothing is 44848 51066 Next nothing is 22633 44848 Next nothing is 25923 22633 Next nothing is 58240 25923 Next nothing is 51783 58240 Next nothing is 33131 51783 Next nothing is 75249 33131 Next nothing is 49394 75249 Next nothing is 87771 49394 Next nothing is 404 87771 Next nothing is 93575 404 Next nothing is 82483 93575 Next nothing is 78096 82483 Next nothing is 28374 78096 Next nothing is 58341 28374 Next nothing is 75198 58341 Next nothing is 64511 75198 Next nothing is 44038 64511 Next nothing is 25136 44038 Next nothing is 88199 25136 Next nothing is 46518 88199 Next nothing is 71787 46518 Next nothing is 68974 71787 Next nothing is 75307 68974 Next nothing is 12176 75307 Next nothing is 62030 12176 Next nothing is 49856 62030 Next nothing is 64466 49856 Next nothing is 668 64466 Next nothing is 57709 668 Next nothing is 52400 57709 Next nothing is 94833 52400 Next nothing is 65415 94833 Next nothing is 80057 65415 Next nothing is 73422 80057 Next nothing is 86874 73422 Next nothing is 94159 86874 Next nothing is 16466 94159 Next nothing is 6549 16466 Next nothing is 92525 6549 Next nothing is 40627 92525 Next nothing is 27531 40627 Next nothing is 88177 27531 Next nothing is 4465 88177 Next nothing is 99189 4465 Next nothing is 47856 99189 Next nothing is 83694 47856 Next nothing is 54379 83694 Next nothing is 47454 54379 Next nothing is 87096 47454 Next nothing is 3469 87096 Next nothing is 99254 3469 Next nothing is 4630 99254 Next nothing is 75878 4630 Next nothing is 21776 75878 Next nothing is 92781 21776 Next nothing is 23060 92781 Next nothing is 89587 23060 Next nothing is 18346 89587 Next nothing is 47867 18346 Next nothing is 41004 47867 Next nothing is 13430 41004 Next nothing is 381 13430 Next nothing is 8755 381 Next nothing is 58832 8755 Next nothing is 92450 58832 Next nothing is 64821 92450 Next nothing is 84642 64821 Next nothing is 2105 84642 Next nothing is 17305 2105 Next nothing is 60154 17305 Next nothing is 77752 60154 Next nothing is 39994 77752 Next nothing is 30257 39994 Next nothing is 60804 30257 Next nothing is 8060 60804 Next nothing is 83168 8060 Next nothing is 81281 83168 Next nothing is 29319 81281 Next nothing is 84291 29319 Next nothing is 2134 84291 Next nothing is 12889 2134 Next nothing is 70671 12889 Next nothing is 53206 70671 Next nothing is 3864 53206 Next nothing is 71232 3864 Next nothing is 35128 71232 Next nothing is 45383 35128 Next nothing is 43864 45383 Next nothing is 83422 43864 Next nothing is 45657 83422 Next nothing is 90923 45657 Next nothing is 93059 90923 Next nothing is 82431 93059 Next nothing is 32308 82431 Next nothing is 94968 32308 Next nothing is 19185 94968 Next nothing is 55937 19185 Next nothing is 53897 55937 Next nothing is 62026 53897 Next nothing is 63032 62026 Next nothing is 81488 63032 Next nothing is 8601 81488 Next nothing is 73718 8601 Next nothing is 22577 73718 Next nothing is 99460 22577 Next nothing is 58858 99460 Next nothing is 65384 58858 Next nothing is 13622 65384 Next nothing is 14212 13622 Next nothing is 90949 14212 Next nothing is 19069 90949 Next nothing is 48930 19069 Next nothing is 48909 48930 Next nothing is 55205 48909 Next nothing is 51696 55205 Next nothing is 11560 51696 Next nothing is 98848 11560 Next nothing is 82785 98848 Next nothing is 85828 82785 Next nothing is 74671 85828 Next nothing is 47269 74671 Next nothing is 87933 47269 Next nothing is 83248 87933 Next nothing is 9002 83248 Next nothing is 55287 9002 Next nothing is 81455 55287 Next nothing is 47329 81455 Next nothing is 16738 47329 Next nothing is 68790 16738 Next nothing is 31232 68790 Next nothing is 98034 31232 Next nothing is 45243 98034 Next nothing is 43597 45243 Next nothing is 98246 43597 Next nothing is 36542 98246 Next nothing is 54606 36542 Next nothing is 9301 54606 Next nothing is 87282 9301 Next nothing is 48551 87282 Next nothing is 91285 48551 Next nothing is 11090 91285 Next nothing is 71454 11090 Next nothing is 65829 71454 Next nothing is 44481 65829 Next nothing is 23672 44481 Next nothing is 34339 23672 Next nothing is 90980 34339 Next nothing is 78901 90980 Next nothing is 3423 78901 Next nothing is 37522 3423 Next nothing is 19932 37522 Next nothing is 92578 19932 Next nothing is 12931 92578 Next nothing is 12677 12931 Next nothing is 819 12677 Next nothing is 6125 819 Next nothing is 53248 6125 Next nothing is 14469 53248 Next nothing is 64440 14469 Next nothing is 35616 64440 Next nothing is 67375 35616 Next nothing is 49214 67375 Next nothing is 66203 49214 Next nothing is 80968 66203 Next nothing is 79396 80968 Next nothing is 37781 79396 Next nothing is 9715 37781 Next nothing is 24581 9715 Next nothing is 63414 24581 Next nothing is 63949 63414 Next nothing is 46595 63949 Next nothing is 9384 46595 Next nothing is 64974 9384 Next nothing is 94277 64974 Next nothing is 27064 94277 Next nothing is 55621 27064 Next nothing is 69222 55621 Next nothing is 70168 69222 Next nothing is 63528 70168 Next nothing is 80304 63528 Next nothing is 94510 80304 Next nothing is 40068 94510 Next nothing is 86847 40068 Next nothing is 4861 86847 Next nothing is 91570 4861 Next nothing is 18108 91570 Next nothing is 92797 18108 Next nothing is 10653 92797 Next nothing is 58973 10653 Next nothing is 65708 58973 Next nothing is 85683 65708 Next nothing is 58791 85683 Next nothing is 84134 58791 Next nothing is 16715 84134 Next nothing is 4130 16715 Next nothing is 8333 4130 Next nothing is 2658 8333 Next nothing is 29888 2658 Next nothing is 92509 29888 Next nothing is 24885 92509 Next nothing is 85346 24885 Next nothing is 88754 85346 Next nothing is 87449 88754 Next nothing is 80326 87449 Next nothing is 41417 80326 Next nothing is 62569 41417 Next nothing is 34147 62569 Next nothing is 37638 34147 Next nothing is 28177 37638 Next nothing is 59599 28177 Next nothing is 98155 59599 Next nothing is 1035 98155 Next nothing is 88241 1035 Next nothing is 12774 88241 Next nothing is 88944 12774 Next nothing is 19873 88944 Next nothing is 8308 19873 Next nothing is 46992 8308 Next nothing is 83493 46992 Next nothing is 49337 83493 Next nothing is 10134 49337 Next nothing is 89272 10134 Next nothing is 21051 89272 Next nothing is 10771 21051 Next nothing is 80834 10771 Next nothing is 89357 80834 Next nothing is 14114 89357 Next nothing is 31302 14114 Next nothing is 51107 31302 Next nothing is 23249 51107 Next nothing is 91555 23249 Next nothing is 20144 91555 Next nothing is 57011 20144 Next nothing is 61058 57011 Next nothing is 59316 61058 Next nothing is 109 59316 Next nothing is 22645 109 Next nothing is 83445 22645 Next nothing is 66015 83445 Next nothing is 82896 66015 Next nothing is 33160 82896 Next nothing is 80234 33160 Next nothing is 69853 80234 Next nothing is 17729 69853 Next nothing is 20261 17729 Next nothing is 95032 20261 Next nothing is 19899 95032 Next nothing is 43848 19899 Next nothing is 53819 43848 Next nothing is 1946 53819 Next nothing is 75651 1946 Next nothing is 62387 75651 Next nothing is 70384 62387 Next nothing is 68507 70384 Next nothing is 88256 68507 Next nothing is 29789 88256 Next nothing is 83043 29789 Next nothing is 14979 83043 Next nothing is 97422 14979 Next nothing is 96333 97422 Next nothing is 665 96333 Next nothing is 83779 665 Next nothing is 15008 83779 Next nothing is 11812 15008 Next nothing is 32086 11812 Next nothing is 19311 32086 Next nothing is 38267 19311 Next nothing is 7440 38267 Next nothing is 8587 7440 Next nothing is 84193 8587 Next nothing is 19413 84193 Next nothing is 47199 19413 Next nothing is 98913 47199 Next nothing is 79128 98913 Next nothing is 1447 79128 Next nothing is 19812 1447 Next nothing is 7520 19812 Next nothing is 58170 7520 Next nothing is 78767 58170 Next nothing is 36504 78767 Next nothing is 12155 36504 Next nothing is 53725 12155 Next nothing is 15724 53725 Next nothing is 31280 15724 Next nothing is 531 31280 Next nothing is 21899 531 Next nothing is 21132 21899 Next nothing is 45275 21132 Next nothing is 14983 45275 Next nothing is 9207 14983 Next nothing is 82137 9207 Next nothing is 13076 82137 Next nothing is 32752 13076 Next nothing is 94091 32752 Next nothing is 91316 94091 Next nothing is 17593 91316 Next nothing is 86692 17593 Next nothing is 83916 86692 Next nothing is 84429 83916 Next nothing is 6123 84429 Next nothing is 52149 6123 Next nothing is 35368 52149 Next nothing is 85722 35368 Next nothing is 84034 85722 Next nothing is 71297 84034 Next nothing is 226 71297 Next nothing is 20433 226 Next nothing is 83398 20433 Next nothing is 5442 83398 Next nothing is 81622 5442 Next nothing is 93237 81622 Next nothing is 76689 93237 Next nothing is 67773 76689 Next nothing is 16764 67773 Next nothing is 12187 16764 Next nothing is 45084 12187 Next nothing is 23959 45084 Next nothing is 83235 23959 Next nothing is 38733 83235 Next nothing is 55868 38733 Next nothing is 29 55868 Next nothing is 83831 29 Next nothing is 80100 83831 Next nothing is 14723 80100 Next nothing is 60832 14723 Next nothing is 72946 60832 Next nothing is 37493 72946 Next nothing is 27258 37493 Next nothing is 67542 27258 Next nothing is 28426 67542 Next nothing is 35520 28426 Next nothing is 19478 35520 Next nothing is 53315 19478 Next nothing is 89835 53315 Next nothing is 45636 89835 Next nothing is 84411 45636 Next nothing is 44013 84411 Next nothing is 67751 44013 Next nothing is 94119 67751 Next nothing is 15872 94119 Next nothing is 97486 15872 Next nothing is 4530 97486 Next nothing is 2285 4530 Next nothing is 48179 2285 Next nothing is 36594 48179 Next nothing is 52069 36594 Next nothing is 44214 52069 Next nothing is 50187 44214 Next nothing is 63191 50187 Next nothing is 96123 63191 Next nothing is 37905 96123 Next nothing is 35302 37905 Next nothing is 26074 35302 Next nothing is 24510 26074 Next nothing is 77136 24510 Next nothing is 34296 77136 Next nothing is 29704 34296 Next nothing is 22944 29704 Next nothing is 10945 22944 Next nothing is 73256 10945 Next nothing is 40940 73256 Next nothing is 2718 40940 Next nothing is 94666 2718 Next nothing is 53811 94666 Next nothing is 75159 53811 Next nothing is 14802 75159 Next nothing is 29858 14802 Next nothing is 79484 29858 Next nothing is 55887 79484 Next nothing is 8798 55887 Next nothing is 89519 8798 Next nothing is 60659 89519 Next nothing is 53544 60659 Next nothing is 8514 53544 Next nothing is 97430 8514 Next nothing is 1228 97430 Next nothing is 16133 1228 Next nothing is 19944 16133 Next nothing is 25547 19944 Next nothing is 76840 25547 Next nothing is 57327 76840 Next nothing is 96467 57327 Next nothing is 97937 96467 Next nothing is 22345 97937 Next nothing is 75533 22345 Next nothing is 80499 75533 Next nothing is 39170 80499 Next nothing is 25194 39170 Next nothing is 78713 25194 Next nothing is 7331 78713 Next nothing is 92642 7331 Next nothing is 45567 92642 Next nothing is 58155 45567 Next nothing is 4918 58155 Next nothing is 92414 4918 Next nothing is 42478 92414 Next nothing is 57589 42478 Next nothing is 46276 57589 Next nothing is 28529 46276 Next nothing is 36871 28529 Next nothing is 44875 36871 Next nothing is 66783 44875 Next nothing is 1043 66783 Next nothing is 78311 1043 Next nothing is 65698 78311 Next nothing is 95457 65698 Next nothing is 28935 95457 Next nothing is 58156 28935 Next nothing is 12445 58156 Next nothing is 21019 12445 Next nothing is 81654 21019 Next nothing is 82814 81654 Next nothing is 75481 82814 Next nothing is 41055 75481 Next nothing is 55067 41055 Next nothing is 49768 55067 Next nothing is 7422 49768 Next nothing is 30983 7422 Next nothing is 81931 30983 Next nothing is 45122 81931 Next nothing is 75101 45122 Next nothing is 71773 75101 Next nothing is 52323 71773 Next nothing is 41386 52323 Next nothing is 36729 41386 Next nothing is 24027 36729 Next nothing is 82430 24027 Next nothing is 53824 82430 Next nothing is 75518 53824 Next nothing is 38146 75518 Next nothing is 27401 38146 Next nothing is 1321 27401 Next nothing is 20200 1321 Next nothing is 30934 20200 Next nothing is 43923 30934 Next nothing is 9472 43923 Next nothing is 87617 9472 Next nothing is 7973 87617 Next nothing is 40413 7973 Next nothing is 34242 40413 Next nothing is 51833 34242 Next nothing is 7298 51833 Next nothing is 26372 7298 Next nothing is 22704 26372 Next nothing is 87196 22704 Next nothing is 1866 87196 Next nothing is 10454 1866 Next nothing is 8810 10454 Next nothing is 14074 8810 Next nothing is 77163 14074 Next nothing is 15394 77163 Next nothing is 5630 15394 Next nothing is 17801 5630 Next nothing is 80920 17801 Next nothing is 22571 80920 Next nothing is 25311 22571 Next nothing is 270 25311 Next nothing is 2144 270 Next nothing is 63031 2144 Next nothing is 82371 63031 Next nothing is 94758 82371 Next nothing is 38188 94758 Next nothing is 34663 38188 Next nothing is 69757 34663 Next nothing is 37718 69757 Next nothing is 55552 37718 Next nothing is 81137 55552 Next nothing is 27652 81137 Next nothing is 87492 27652 Next nothing is 25632 87492 Next nothing is 95731 25632 Next nothing is 53233 95731 Next nothing is 69684 53233 Next nothing is 75600 69684 Next nothing is 84135 75600 Next nothing is 72452 84135 Next nothing is 73281 72452 Next nothing is 45808 73281 Next nothing is 934 45808 Next nothing is 12130 934 Next nothing is 15750 12130 Next nothing is 69210 15750 Next nothing is 99905 69210 Next nothing is 63643 99905 Next nothing is 47850 63643 Next nothing is 83564 47850 Next nothing is 77241 83564 Next nothing is 75978 77241 Next nothing is 24255 75978 Next nothing is 89197 24255 Next nothing is 42934 89197 Next nothing is 76920 42934 Next nothing is 29994 76920 Next nothing is 45675 29994 Next nothing is 30076 45675 Next nothing is 69280 30076 Next nothing is 70557 69280 Next nothing is 43708 70557 Next nothing is 62628 43708 Next nothing is 89095 62628 Next nothing is 80504 89095 Next nothing is 76887 80504 Next nothing is 27720 76887 Next nothing is 67628 27720 Next nothing is 11080 67628 Next nothing is 37351 11080 Next nothing is 55940 37351 Next nothing is 56000 55940 Next nothing is 79866 56000 Next nothing is 33203 79866 Next nothing is 16228 33203 Next nothing is 8716 16228 Next nothing is 74862 8716 Next nothing is 32459 74862 Next nothing is 58183 32459 Next nothing is 18633 58183 Next nothing is 40377 18633 Next nothing is 70141 40377 Next nothing is 84619 70141 Next nothing is 28850 84619 Next nothing is 45925 28850 Next nothing is 7057 45925 Next nothing is 16792 7057 Next nothing is 54610 16792 Next nothing is 21249 54610 Next nothing is 15667 21249 Next nothing is 91038 15667 Next nothing is 44221 91038 Next nothing is 992 44221 Next nothing is 8700 992 Next nothing is 45100 8700 Next nothing is 68628 45100 Next nothing is 67824 68628 Next nothing is 46145 67824 Collect the comments. 46145 --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-92-4ebebad4b724> in <module>() 14 nothing = text.read() 15 print(nothing,hint) ---> 16 if re.search(r'(d){2,5}',nothing).group(): 17 hint = re.search(r'(d){2,5}',nothing).group() 18 else: AttributeError: 'NoneType' object has no attribute 'group'
for c in comments: print(c.decode('utf-8'),end='')
输出:
**************************************************************** **************************************************************** ** ** ** OO OO XX YYYY GG GG EEEEEE NN NN ** ** OO OO XXXXXX YYYYYY GG GG EEEEEE NN NN ** ** OO OO XXX XXX YYY YY GG GG EE NN NN ** ** OOOOOOOO XX XX YY GGG EEEEE NNNN ** ** OOOOOOOO XX XX YY GGG EEEEE NN ** ** OO OO XXX XXX YYY YY GG GG EE NN ** ** OO OO XXXXXX YYYYYY GG GG EEEEEE NN ** ** OO OO XX YYYY GG GG EEEEEE NN ** ** ** **************************************************************** **************************************************************
第7关:http://www.pythonchallenge.com/pc/def/oxygen.html (未完成)