All pastes #609750 Raw Edit

Mine

public text v1 · immutable
·published 2007-07-09 01:41 UTC
rendered paste body
#!/usr/bin/perl -w

for ($h = 1; print "$h\n"; map {$h = shift @{$l{$_}} if $l{$_}[0] == $t[0]} keys %l) {
 map {push @{$l{$_}}, $_ * $h} (2, 3, 5) and @t = sort {$a <=> $b} map $l{$_}[0], keys %l;
}

# Matthias Dallmeier