Submission

Status:
[P-SS][PPPPPPPPPPP]

Score: 70

User: Nathlol

Problemset: ดูวีทูปเบอร์

Language: c

Time: 0.001 second

Submitted On: 2024-09-23 15:15:36

#include <stdio.h>

int main(){
    int x, y;
    int a, b;
    scanf("%d %d\n%d %d", &x, &y, &a, &b);
    int z[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
    int day = 0;
    int m = z[y - 1] - x;
    int s = 0;
    for(int i = y + 1;i<b - 1;i++){
        s = s + z[i - 1];
    }
    day = day + a;
    day = day + m + s;

    int cnt = day * 3;
    cnt = cnt + 3;

    printf("%d", cnt);
}