Submission

Status:
[P-SS][PPPPPPPPPPP]

Score: 70

User: Nathlol

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

Language: c

Time: 0.001 second

Submitted On: 2024-09-23 15:00:32

#include <stdio.h>

int main(){
    int x, y;
    int a, b;
    int n = 0;
    scanf("%d %d\n%d %d", &x, &y, &a, &b);
    if(y == 1 || y == 3 || y == 5
        || y == 7 || y == 8 || y == 10
        || y == 12){
            n = 31;
        }else if (y == 4 || y == 6
        || y == 9 || y == 11){
            n = 30;
        }else if(y == 2){
            n = 28;
        }
    int cnt = 0;
    for(int i = x;i<n;i++){
        cnt = cnt + 3;
    }
    for(int i = y + 1;i<b;i++){
        if(i == 1 || i == 3 || i == 5
        || i == 7 || i == 8 || i == 10
        || i == 12){
            cnt = cnt + 93;
        }else if (i == 4 || i == 6
        || i == 9 || i == 11){
            cnt = cnt + 90;
        }else if(i == 2){
            cnt = cnt + 84;
        }
    }
    for(int i = 0;i<a;i++){
        cnt = cnt + 3;
    }
    cnt = cnt + 3;
    printf("%d", cnt);
}