Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Five-weekends/PicoLisp/five-weekends.l
Normal file
17
Task/Five-weekends/PicoLisp/five-weekends.l
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
(setq Lst
|
||||
(make
|
||||
(for Y (range 1900 2100)
|
||||
(for M (range 1 12)
|
||||
(and
|
||||
(date Y M 31)
|
||||
(= "Friday" (day (date Y M 1)))
|
||||
(link (list (get *Mon M) Y)) ) ) ) ) )
|
||||
|
||||
(prinl "There are " (length Lst) " months with five weekends:")
|
||||
(mapc println (head 5 Lst))
|
||||
(prinl "...")
|
||||
(mapc println (tail 5 Lst))
|
||||
(prinl)
|
||||
(setq Lst (diff (range 1900 2100) (uniq (mapcar cadr Lst))))
|
||||
(prinl "There are " (length Lst) " years with no five-weekend months:")
|
||||
(println Lst)
|
||||
Loading…
Add table
Add a link
Reference in a new issue