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:17:30

#include <bits/stdc++.h>
using namespace std;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int m, d, T=0;
    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;
}