Submission
Status:
PPPPP-PPP----PP---P-
Subtask/Task Score:
55/100
Score: 55
User: Nuttykub
Problemset: ปฏิทินวันแม่
Language: cpp
Time: 0.005 second
Submitted On: 2026-10-01 08:52:38
#include <bits/stdc++.h>
using namespace std;
int main(){
int m,d;
cin >> m >> d;
int month[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
int total = 0;
for (int i = m-1;i < 7;i++){
total+=month[i];
}
total+=12;
int a = total%7;
cout << a+d-1;
}