- Perlについての質問箱 64箱目 [転載禁止]©2ch.net
404 :デフォルトの名無しさん[sage]:2015/09/15(火) 21:57:03.82 ID:474V8Q6+ - http://search.cpan.org/~allenday/Math-Combinatorics-0.09/
use Math::Combinatorics; my @n = qw(a b c); print "combinations of 2 from: ".join(" ",@n)."\n"; print "------------------------".("--" x scalar(@n))."\n"; print join("\n", map { join " ", @$_ } combine(2,@n)),"\n"; combinations of 2 from: a b c ------------------------------ a b a c b c
|