Submission
Status:
PPPPPPPPP----PP-PPPP
Score: 75
User: Namkhing
Problemset: ปฏิทินวันแม่
Language: cpp
Time: 0.002 second
Submitted On: 2025-04-10 22:09:15
#include <bits/stdc++.h>
using namespace std;
const int day[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int main() {
cin.tie(nullptr)->ios_base::sync_with_stdio(false);
int m, d;
cin >> m >> d; m--, d--;
while (m != 7) {
d += day[m];
d %= 7;
m++;
if (m >= 12) m = 0;
}
d += 25; d %= 7;
cout << d + 1;
}