워게임(WarGame)/PythonChallenge
[Python challenge Level1] – map (문자 대체)
devanix
2011. 6. 20. 20:48
[ problem ] - http://www.pythonchallenge.com/pc/def/map.html
♧ 그림과 같이 K->M, O->Q, E->G의 규칙성은 해당 문자가 2만큼 떨어져 있다.
그림의 보라색 글자가 무슨 암호화 같이 보이지만 해당 글자를 2씩 증가하면
아래와 같이 string.maketrans() 권장한다는 친절한 멘트와 힌트가 보인다. (단, y->a)
"i hope you didnt translate it by hand. thats what computers are for. |
♧ 현재 url의 "map.html"을 규칙성을 적용해 보면 "orc.jvon"이 된다.
(http://www.pythonchallenge.com/pc/def/ocr.jvon)
[ Solution ] - http://www.pythonchallenge.com/pcc/def/ocr.html
(※ 문제에 대한 다양한 해결법은 링크 참조.)