Submission
Status:
PPPPPPPPP----PP-PPPP
Subtask/Task Score:
75/100
Score: 75
User: pottersk146
Problemset: ปฏิทินวันแม่
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-12 20:16:44
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int m, d, T;
int day[12]= {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
cin>>m>>d;
for (int i=m; i<8; i++){
T+=day[i-1];
}
T += 11;
//d-1+t % 7 + 1
int days=(d-1+T)%7+1;
cout<<days;
}