Submission

Status:

PPPPPPPPPPPPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: maxprogoji

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

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-05 12:44:32

#include <iostream>
#include <cmath>
using namespace std;
int main(){
    int md[13] = {0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
    int t = 223;
    int m, d;
    cin >> m >> d;
    d = (d + (t - md[m] % 7)) % 7;
    if(d == 0) d = 7;
    cout << d;
}