Created
April 16, 2010 04:13
-
-
Save keedi/367997 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.010; | |
use common::sense; | |
use Math::Prime::TiedArray; | |
use List::Compare; | |
# | |
# 실행전 설치 모듈 확인 | |
# $ cpanm common::sense Math::Prime::TiedArray List::Compare | |
# | |
# 2 부터 100까지의 숫자 중 소수가 아닌 수 구하기 | |
tie my @primes, "Math::Prime::TiedArray", precompute => 100; | |
say "$_ " for sort { $a <=> $b } List::Compare->new('--unsorted', \@primes, [ 2 .. 100 ])->get_complement; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
good~ thnx