Day of the Week by pooq

File standardInput readLines map(split map(asNumber)do(y:=at(0)
m:=at(1)
if(m<3,m=m+12;y=y-1)
writeln((y+(y/4)floor-(y/100)floor+(y/400)floor+(2.6*m+1.6)floor+last)%7)))

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page