Submission

Status:
[PPPP][PPPPPPPPPPP]

Score: 100

User: Hitler

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

Language: cpp

Time: 0.003 second

Submitted On: 2024-12-18 13:24:07

#include <bits/stdc++.h>

#define int long long int
using namespace std;

int32_t main(){
    int x,y,a,b;cin>>x>>y>>a>>b;
    int m[] = {31,28,31,30,31,30,31,31,30,31,30,31};
    if(y==b){
        cout<<(a-x+1)*3;
    }
    else{
        int ans = (m[y-1]-x+1)+a;
        for(int i=y+1;i<=b-1;i++){
            ans+=m[i-1];
        }
        cout<<ans*3;
    }
}