Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Count-the-coins/PicoLisp/count-the-coins-1.l
Normal file
8
Task/Count-the-coins/PicoLisp/count-the-coins-1.l
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
(de coins (Sum Coins)
|
||||
(let (Buf (mapcar '((N) (cons 1 (need (dec N) 0))) Coins) Prev)
|
||||
(do Sum
|
||||
(zero Prev)
|
||||
(for L Buf
|
||||
(inc (rot L) Prev)
|
||||
(setq Prev (car L)) ) )
|
||||
Prev ) )
|
||||
6
Task/Count-the-coins/PicoLisp/count-the-coins-2.l
Normal file
6
Task/Count-the-coins/PicoLisp/count-the-coins-2.l
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
(for Coins '((100 50 25 10 5 1) (200 100 50 20 10 5 2 1))
|
||||
(println (coins 100 (cddr Coins)))
|
||||
(println (coins (* 1000 100) Coins))
|
||||
(println (coins (* 10000 100) Coins))
|
||||
(println (coins (* 100000 100) Coins))
|
||||
(prinl) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue