文章

8

粉丝

0

获赞

77

访问

1.6k

头像
日期 题解:
P1011 贵州大学机试题
发布于2026年3月16日 20:30
阅读数 165

#include <bits/stdc++.h>

using namespace std;

int f[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
string wd[7]={"Thusday","Friday","Saturday","Sunday","Monday","Tuesday","Wednesday"};

int main()
{
    int m,d;
    cin>>m>>d;
    if(m==4)
        cout<<wd[(d-12)%7];
    else{
        int ans=18+d;
        for(int i=5;i<m;i++)
            ans+=f[i];
        cout<<wd[ans%7];
    }
    return 0;
}

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发