Author: | missingfaktor |
---|---|
Mode: | factor |
Date: | Wed, 28 Dec 2011 05:47:47 |
! Problem #1 USE: 1000 iota [ { [ 3 divisor? ] [ 5 divisor? ] } 1|| ] filter sum ! Problem #2 USE: fry : million ( n -- n' ) 1000000 * ; : fibonacci ( upto -- fib ) 0 1 rot '[ dup _ < ] [ swap over + dup ] produce 2nip but-last ; 4 million fibonacci [ even? ] filter sum