Submission
Status:
PPPPPPPPPP---PP-PPPP
Subtask/Task Score:
80/100
Score: 80
User: solarsunny
Problemset: ปฏิทินวันแม่
Language: cpp
Time: 0.003 second
Submitted On: 2025-09-28 19:22:22
#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--;
if(m <= 7) {
d= d + 11;
for(; m<7; m++) {
d = d + month[m];
}
} else {
d = d - 20;
for(int i=8; i<m; i++) {
d = d - month[m];
}
d =d +7*100;
}
cout << d%7 << endl;
}