Submission

Status:

PPPPP-PPP----PP--PPP

Subtask/Task Score:

65/100

Score: 65

User: eexd

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

Language: c

Time: 0.002 second

Submitted On: 2025-10-06 15:35:58

#include <stdio.h>

int main()
{
    int m, d; scanf("%d%d", &m, &d);

    if(m>8) m=(m-12);

    int aug_firstday = d;
    if(m == 9) aug_firstday = (d+1)%7;
    if(m == 10) aug_firstday = (d+6)%7;
    if(m == 11) aug_firstday = (d+3)%7;
    if(m == 12) aug_firstday = (d+1)%7;
    if(m == 1) aug_firstday = (d+6)%7;
    if(m == 2) aug_firstday = (d+3)%7;
    if(m == 3) aug_firstday = (d+3)%7;
    if(m == 4) aug_firstday = d;
    if(m == 5) aug_firstday = (d+3)%7;
    if(m == 6) aug_firstday = (d+2)%7;
    if(m == 7) aug_firstday = d;
    if(m == 8) aug_firstday = (d+4)%7;
    printf("%d\n", aug_firstday);

    return (0);
}