A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
13
Task/Happy-numbers/PicoLisp/happy-numbers.l
Normal file
13
Task/Happy-numbers/PicoLisp/happy-numbers.l
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
(de happy? (N)
|
||||
(let Seen NIL
|
||||
(loop
|
||||
(T (= N 1) T)
|
||||
(T (member N Seen))
|
||||
(setq N
|
||||
(sum '((C) (** (format C) 2))
|
||||
(chop (push 'Seen N)) ) ) ) ) )
|
||||
|
||||
(let H 0
|
||||
(do 8
|
||||
(until (happy? (inc 'H)))
|
||||
(printsp H) ) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue