文章
37
粉丝
168
获赞
13
访问
285.3k
int main()
{
int m,d;
cin>>m;
cin>>d;
int f[13]={0,0,0,0,18,31,30,31,31,30,31,30,31};
int flag=0;
if(m==4) d=d-12;
if(m<4||m>12) flag=1;
if(d>f[m]) flag=1;
int ans=d;
for(int i=4; i<m; i++){
ans+=f[i];
}
string xq[7]={"Thursday","Friday","Saturday","Sunday","Monday","Tuesday","Wednesday"};
cout<<xq[ans%7];
}
登录后发布评论
暂无评论,来抢沙发