HHC 2015 RPL Programming Contest
|
10-07-2015, 04:59 PM
(This post was last modified: 10-07-2015 05:00 PM by C.Ret.)
Post: #3
|
|||
|
|||
RE: HHC 2015 RPL Programming Contest
Not sure this is the fastest way of doing it.
But it is simple: Code: « 1. * DUP SORT ΔLIST SWAP ISPRIME? + 0. POS NOT » It is the concatenation of the two tests: A list of distinct numbers: Code: « SORT ΔLIST 0. POS NOT » A list of primes: Code: « ISPRIME? 0. POS NOT » The 1. * is only here to convert the list of exact integer (aka TYPE 28) into regular 'dot' integers (aka TYPE 0). The ISPRIME? function aways returns 0. or 1. 'dot' integer. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HHC 2015 RPL Programming Contest - David Hayden - 10-05-2015, 01:48 PM
RE: HHC 2015 RPL Programming Contest - David Hayden - 10-07-2015, 01:59 PM
RE: HHC 2015 RPL Programming Contest - C.Ret - 10-07-2015 04:59 PM
RE: HHC 2015 RPL Programming Contest - Joe Horn - 10-08-2015, 04:42 AM
RE: HHC 2015 RPL Programming Contest - C.Ret - 10-08-2015, 03:57 PM
RE: HHC 2015 RPL Programming Contest - David Hayden - 10-20-2015, 02:18 AM
RE: HHC 2015 RPL Programming Contest - Claudio L. - 10-20-2015, 01:03 PM
RE: HHC 2015 RPL Programming Contest - Gerald H - 10-20-2015, 02:47 PM
RE: HHC 2015 RPL Programming Contest - Jacob Wall - 10-20-2015, 11:28 PM
RE: HHC 2015 RPL Programming Contest - Werner - 10-21-2015, 07:16 AM
RE: HHC 2015 RPL Programming Contest - Jacob Wall - 10-24-2015, 12:23 AM
|
User(s) browsing this thread: 1 Guest(s)