Day of the Week by 51b

import std.stdio;void main(){for(int y,m,d;~scanf("%d%d%d",&y,&m,&d);writeln((y+y/4-y/100+y/400+m*13/5+d)%7))m+=m<3?y--,18:6;}

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

download

return to the top page