Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
5
Task/Perfect-numbers/PicoLisp/perfect-numbers-1.l
Normal file
5
Task/Perfect-numbers/PicoLisp/perfect-numbers-1.l
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
(de perfect (N)
|
||||
(let C 0
|
||||
(for I (/ N 2)
|
||||
(and (=0 (% N I)) (inc 'C I)) )
|
||||
(= C N) ) )
|
||||
7
Task/Perfect-numbers/PicoLisp/perfect-numbers-2.l
Normal file
7
Task/Perfect-numbers/PicoLisp/perfect-numbers-2.l
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
(de faster (N)
|
||||
(let (C 1 Stop (sqrt N))
|
||||
(for (I 2 (<= I Stop) (inc I))
|
||||
(and
|
||||
(=0 (% N I))
|
||||
(inc 'C (+ (/ N I) I)) ) )
|
||||
(= C N) ) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue