文章
5
粉丝
136
获赞
4
访问
41.6k
#include <iostream>
using namespace std;
int main()
{
int month[9]={18,31,30,31,31,30,31,30,31};
string week[7]={"Thursday","Friday","Saturday","Sunday","Monday","Tuesday","Wednesday"};
int a,b,day=0;
cin>>a;
cin>>b;
for(int i=0;i<a;i++)
{
day+=month[i];
}
day+=b-3;//算日期的加一天少一天我头大,所幸调试看差多少补多少
cout<<week[day%7]<<endl;
return 0;
}
登录后发布评论
暂无评论,来抢沙发