文章
38
粉丝
56
获赞
67
访问
4.1k
//思路:纯粹暴力。
#include <bits/stdc++.h>
using namespace std;
int month[9]={-12,18,49,79,110,141,171,202,232};
int main()
{
int m,d;
cin>>m>>d;
d+=month[m-4];
if(d%7==3) cout<<"Sunday";
else if(d%7==4) cout<<"Monday";
else if(d%7==5) cout<<"Tuesday";
else if(d%7==6) cout<<"Wednesday";
else if(d%7==0) cout<<"Thursday";
else if(d%7==1) cout<<"Friday";
else if(d%7==2) cout<<"Saturday";
return 0;
}
登录后发布评论
暂无评论,来抢沙发