文章
17
粉丝
43
获赞
10
访问
14.5k
#include<bits/stdc++.h>
using namespace std;
struct node
{
int y,m,d;
}p;
int main()
{
cin>>p.m>>p.d;
string xq[10]={"0","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"};
int day[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int ans=0;
if(p.m==4)
{
ans=p.d-12;
}
else
{
for(int i=4;i<p.m;i++)
{
ans=ans+day[i];
}
ans=ans-12+p.d;
}
int w=ans%7;
cout<<xq[(4+w)%7]<<endl;
return 0;
}
登录后发布评论
暂无评论,来抢沙发