파이썬 챌린지
주소: http://www.pythonchallenge.com/
0단계
문제주소: http://www.pythonchallenge.com/pc/def/0.html
2의 38승
- >>> 2**38
274877906944L
다음단계: http://www.pythonchallenge.com/pc/def/274877906944.html
1단계
문제주소: http://www.pythonchallenge.com/pc/def/map.html
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.
- >>> full_text = "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."
>>> tbl = string.maketrans('abcdefghijklmnopqrstuvwxyz', 'cdefghijklmnopqrstuvwxyzab')
>>> full_text.translate(tbl)
"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."
>>>
url인 map를 다시 translate(tbl)을 때리면, ocr이 나온다.
다음단계: http://www.pythonchallenge.com/pc/def/ocr.html
2단계
문제주소: http://www.pythonchallenge.com/pc/def/ocr.html
- <!--
find rare characters in the mess below:
--> - <!-- 생략................
긴 문장에서 드문 글자 찾기..
History
Last edited on 02/16/2008 09:35 by jong10
Comments (0)