12 lines
220 B
Text
12 lines
220 B
Text
function p(y)
|
|
return (y + int(y/4) - int(y/100) + int(y/400)) mod 7
|
|
end function
|
|
|
|
function isLongYear(y)
|
|
return (p(y) = 4) or (p(y - 1) = 3)
|
|
end function
|
|
|
|
for y = 2000 to 2100
|
|
if isLongYear(y) then print y
|
|
next y
|
|
end
|