文章
82
粉丝
344
获赞
28
访问
695.9k
#include <iostream>
#include <stdio.h>
using namespace std;
string s[7]={"Thursday","Friday","Saturday","Sunday","Monday","Tuesday","Wednesday"};
int month[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int main(){
int m,d;
cin>>m>>d;
int ans=0;
if(m==4){
ans=d-12;
}
else{
ans=18;
for(int i=5;i<m;i++){
ans+=month[i];
}
ans+=d;
}
ans=ans%7;
cout<<s[ans];
return 0;
}
登录后发布评论
暂无评论,来抢沙发