Codegolf: Difference between revisions

From NoName e.V.
Jump to navigation Jump to search
(New page: === Challenge #1 === <SdK> gibts wörter, die nach rot13 n anderes existierendes wort ergeben? ==== mxf: Perl ==== ==== ~~~: Ruby ==== ruby -e'words={};IO.readlines(ARGV[0]).each{|w|wo...)
 
mNo edit summary
Line 11: Line 11:
  user    0m5.692s
  user    0m5.692s
  sys    0m0.421s
  sys    0m0.421s
[[Category:Projekte]]

Revision as of 13:04, 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]=true};words.each_key{|w|puts w if words[w.tr("a-z","n-za-m")]}' /usr/share/dict/web2
real    0m9.114s
user    0m5.692s
sys     0m0.421s