Submission

Status:

PPPPPPPPP-P--PP-PPPP

Subtask/Task Score:

80/100

Score: 80

User: letdown

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

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-03 19:42:49

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