Submission

Status:

PPPPPPPPP----PP-PPPP

Subtask/Task Score:

75/100

Score: 75

User: Nuttykub

Problemset: ปฏิทินวันแม่

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-01 09:04:53

#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)%7;
}