Submission
Status:
P-P----P------------
Subtask/Task Score:
15/100
Score: 15
User: Prap
Problemset: ปฏิทินวันแม่
Language: cpp
Time: 0.004 second
Submitted On: 2026-03-25 12:49:26
#include <iostream>
#include <cmath>
#include <vector>
#include <string>
using namespace std;
int main() {
int D,M;
cin>>M>>D;
int month[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
int count = 0;
for (int i = M-1; i<7; i++) {
count = count + month[i];
}
count = count + 12;
cout<<(count%7+2)%7;
}