Created
February 13, 2014 19:02
-
-
Save sambaiz/8981568 to your computer and use it in GitHub Desktop.
abcdefghijklm <-> nopqrstuvwxyzで文字を置換しただけの暗号@CodeIQ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> val angou = "fhaal naq jvaql" | |
angou: String = fhaal naq jvaql | |
scala> angou.map({s => if(s < 'a' || s > 'z') s else if(s <= 'm') (s + 'n' - 'a').toChar else (s - 'n' + 'a').toChar}) | |
res43: String = sunny and windy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment