Submission
Status:
[PPPP][PPPPPPPPPPP]
Subtask/Task Score:
{30/30}{70/70}
Score: 100
User: anonymous
Problemset: ดูวีทูปเบอร์
Language: cpp
Time: 0.006 second
Submitted On: 2026-09-30 22:47:39
#include <bits/stdc++.h>
using namespace std;
int32_t main(){
int d1,d2,m1,m2;
cin >> d1 >> m1 >> d2 >> m2;
int m[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
if(m1==m2){
cout<<(d1-d2+1)*3;
}
else{
int ans = (m[m1-1]-d1+1)+d2;
for(int i=m1+1;i<=m2-1;i++){
ans+=m[i-1];
}
cout<<ans*3;
}
}