Day of the Week by eban

main(y,m,d){for(;~scanf("%d%d%d",&y,&m,&d);printf("%d\n",(y+y/4-y/100+y/400+"-bed=pen+mad."[m]+d)%7))y-=m<3;}

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

download

return to the top page