my @hand = qw (1 2 4 8); # nicht verändern my @ch = @hand; # die liste der chancen my $sum = 0; for (@hand) { $sum += $_; } for (@hand) { $k = $_; for (0..$#ch) { my $pu = $k + $ch[$_]; push (@ch, $pu) unless $pu > $sum; } say "@ch\n"; # jetzt sortieren und doppelte raus