Submission
Status:
P-P-P-P-P----PP----P
Subtask/Task Score:
40/100
Score: 40
User: mik
Problemset: ปฏิทินวันแม่
Language: cpp
Time: 0.005 second
Submitted On: 2026-10-10 18:27:19
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false),cin.tie(NULL);
int month[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int m,d,t=0;
cin >> m >> d;
if (m<8){
for (int i=m;i<8;i++){
t += month[i-1];
}
}
t += 11;
int a = t%7;
int day = (a+d)%7;
if (day==0) day=7;
cout << day;
return 0;
}