Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Five-weekends/Maxima/five-weekends.maxima
Normal file
17
Task/Five-weekends/Maxima/five-weekends.maxima
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
left(a, n) := makelist(a[i], i, 1, n)$
|
||||
right(a, n) := block([m: length(a)], makelist(a[i], i, m - n + 1, m))$
|
||||
|
||||
a: [ ]$
|
||||
for year from 1900 thru 2100 do
|
||||
for month in [1, 3, 5, 7, 8, 10, 12] do
|
||||
if weekday(year, month, 1) = 'friday then
|
||||
a: endcons([year, month], a)$
|
||||
|
||||
length(a);
|
||||
201
|
||||
|
||||
left(a, 5);
|
||||
[[1901,3],[1902,8],[1903,5],[1904,1],[1904,7]]
|
||||
|
||||
right(a, 5);
|
||||
[[2097,3],[2098,8],[2099,5],[2100,1],[2100,10]]
|
||||
Loading…
Add table
Add a link
Reference in a new issue