Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Anti-primes/PicoLisp/anti-primes.l
Normal file
18
Task/Anti-primes/PicoLisp/anti-primes.l
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
(de factors (N)
|
||||
(let C 1
|
||||
(when (>= N 2)
|
||||
(inc 'C)
|
||||
(for (I 2 (>= (/ N 2) I) (inc I))
|
||||
(and (=0 (% N I)) (inc 'C)) ) )
|
||||
C ) )
|
||||
(de anti (X)
|
||||
(let (M 0 I 0 N 0)
|
||||
(make
|
||||
(while (> X I)
|
||||
(inc 'N)
|
||||
(let R (factors N)
|
||||
(when (> R M)
|
||||
(link N)
|
||||
(setq M R)
|
||||
(inc 'I) ) ) ) ) ) )
|
||||
(println (anti 20))
|
||||
Loading…
Add table
Add a link
Reference in a new issue