Thread RDW #2 - Rätsel der Woche Nr. 2 (155 answers)
Opened by renee at 2004-07-16 12:08

betterworld
 2004-07-19 14:32
#84461 #84461
User since
2003-08-21
2614 Artikel
ModeratorIn

user image
Ich habe denselben Algorithmus auch noch einmal in anderer Form (dieses Skript entstand vor dem Golf-Wettbewerb):
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
#!/usr/bin/perl -l
use strict;
use warnings;

my $i = '0' x @ARGV;

do {
  print join ',', map {substr($i, $_, 1)?$ARGV[$_]:()} 0..$#ARGV;
} while ($i =~ s/0(1*)$/"1"."0"x length("Å©")/e);
\n\n

<!--EDIT|betterworld|1090233199-->

View full thread RDW #2 - Rätsel der Woche Nr. 2