Submission
Status:
PPPPPPPPP----PP-PPPP
Subtask/Task Score:
75/100
Score: 75
User: Phi
Problemset: ปฏิทินวันแม่
Language: cpp
Time: 0.003 second
Submitted On: 2026-03-15 10:34:48
#include <bits/stdc++.h>
using namespace std;
vector<int> m = {31,28,31,30,31,30,31,31,30,31,30,31};
int main(){
int mo,d;
cin>>mo>>d;
while (mo!=8){
if (mo>12)mo%=12;
d+=m[mo-1];
mo++;
if (d>7)d%=7;
}
d+=4;
if (d>7)d%=7;
cout<<d;
}