Submission
Status:
PPPPPPPPPPPPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: mameeewin
Problemset: ปฏิทินวันแม่
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-09 18:52:16
#include <iostream>
#include <vector>
using namespace std;
int main(){
vector<int> months={31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int m, d, x=0; cin >> m >> d;
for (int i=0; i<m-1; i++) x+=months[i];
x+=1;
cout << ((d-1+(224-x))%7+7)%7+1;
}