Codegolf: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
==== [[User:PhilFry|PhilFry]]: Ruby ==== | ==== [[User:PhilFry|PhilFry]]: Ruby ==== | ||
ruby -e'words={};IO.readlines(ARGV[0]).each{|w|words[w.downcase]=true};words.each_key{|w| | ruby -e'words={};IO.readlines(ARGV[0]).each{|w|words[w.downcase.chomp]=true};words.each_key{|w|r=w.tr("a-z","n-za-m");puts w+"->"+r if words[r]}' /usr/share/dict/web2 | ||
136 Zeichen [[http://phil.idlecrew.de/rot13.txt Ausgabe]] | |||
real 0m9.114s | real 0m9.114s |
Revision as of 13:34, 14 September 2007
Challenge #1
<SdK> gibts wörter, die nach rot13 n anderes existierendes wort ergeben?
mxf: Perl
PhilFry: Ruby
ruby -e'words={};IO.readlines(ARGV[0]).each{|w|words[w.downcase.chomp]=true};words.each_key{|w|r=w.tr("a-z","n-za-m");puts w+"->"+r if words[r]}' /usr/share/dict/web2
136 Zeichen [Ausgabe]
real 0m9.114s user 0m5.692s sys 0m0.421s