Submission

Status:

PPPPP-PPP-P--PP---P-

Subtask/Task Score:

60/100

Score: 60

User: letdown

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

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-03 19:29:47

#include <iostream>
#include <math.h>
#include <string.h>

using namespace std;
int main() {
    int m, d, daystill;
    cin >> m >> d;
    m--;
    int ms[] = {31, 28, 31, 30, 31, 30,
                31, 31, 30, 31, 30, 31};

    daystill = 365 - 31 - 30 - 31 - 30 - 31 + 12;

    for (int i = 0; i < m; i++) {
        daystill -= ms[i];
    }

    cout << daystill % 7 + d - 1;
}