文章
10
粉丝
99
获赞
5
访问
6.9k
#include <bits/stdc++.h>
using namespace std;
int f[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int main(){
int month,day;
int ans=0;
scanf("%d%d",&month,&day);
if(month==4){
ans=day-12;
}
else{
for(int i=5;i<month;i++){
ans=ans+f[i];
}
ans=ans+day+18;
}
int k=ans%7;
switch(k){
case 0: printf("Thursday"); break;
case 1: printf("Friday"); break;
case 2: printf("Saturady"); break;
case 3: printf("Sunday"); break;
&...
登录后发布评论
暂无评论,来抢沙发