Submission
Status:
PPPPPPPPP--P-PPPPPPP
Subtask/Task Score:
85/100
Score: 85
User: solarsunny
Problemset: ปฏิทินวันแม่
Language: cpp
Time: 0.002 second
Submitted On: 2025-09-28 19:11:13
#include <bits/stdc++.h>
using namespace std;
int month[] = {3,0,3,2,3,2,3,3,2,3,2,3};
int main()
{
int m, d;
cin >> m >> d;
m--;
d= d + 11;
if(m <= 7) {
for(; m<7; m++) {
d = d + month[m];
}
} else {
for(int i=7; i<m; i++) {
d = d + month[m];
}
}
cout << d%7 << endl;
}