Submission
Status:
PPPPPPPPP----PP-PPPP
Subtask/Task Score:
75/100
Score: 75
User: erng
Problemset: ปฏิทินวันแม่
Language: cpp
Time: 0.003 second
Submitted On: 2025-09-26 22:01:36
#include <bits/stdc++.h>
using namespace std;
int m,d, mn[14], cd, cy=224;
int main()
{
cin>>m>>d;
mn[1]=31;
mn[2]=28;
mn[3]=31;
mn[4]=30;
mn[5]=31;
mn[6]=30;
mn[7]=31;
mn[8]=31;
mn[9]=30;
mn[10]=31;
mn[11]=30;
mn[12]=31;
for (int i=1; i<m; i++)
{
cd=cd+mn[i];
}
cd++;
cy=cy-cd+d;
cout<<cy%7;
}