标签:
#include<stdio.h> #include<string.h> #include<math.h> #include<iostream> #include<algorithm> #include<queue> #include<vector> #include<set> #include<stack> #include<string> #include<sstream> #include<map> #include<cctype> #include<limits.h> using namespace std; int main() { int y, m, d, w; while(scanf("%d%d%d",&y,&m,&d)!=EOF) { if(m < 3) { m += 12; --y; } w =(d+2*m+3*(m+1)/5+y+y/4-y/100+y/400+1)%7; printf("%d\n",w); } return 0; }
An problem about date 根据年月日计算 星期几
标签:
原文地址:http://www.cnblogs.com/A-FM/p/5452567.html