Submission
Status:
PPPPPPPPP----PP-PPPP
Subtask/Task Score:
75/100
Score: 75
User: mik
Problemset: ปฏิทินวันแม่
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-10 18:22:56
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false),cin.tie(NULL);
int month[7] = {3,0,3,2,3,2,3};
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;
}