Day of the Week by ksk

while 1=1do
Scanf.scanf"%d %d %d
"(fun y m d->let y=y-3/(m+1)in
Printf.printf"%d
"((y*5/4-(y/100+1)*3/4+539449/m/m-50/m+d)mod 7))done

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

download

return to the top page