文章
33
粉丝
78
获赞
3
访问
18.4k
#include <bits/stdc++.h>
using namespace std;
int main(){
int month,day;
int f[13] = {0,31,29,31,30,31,30,31,31,30,31,30,31};
scanf("%d",&month);
scanf("%d",&day);
int before = 0;
for(int i = 0;i <4;i++){
before +=f[i];
}
before += 12;
int after = 0;
for(int i = 0;i <month;i++){
after +=f[i];
}
after += day;
int gap = after - before;
if(gap%7 == 0)
printf("Thursday");
else if(gap%7 == 1)
printf("Friday");
else if(gap%7 == 2)
&nbs...
登录后发布评论
暂无评论,来抢沙发