Submission
Status:
[PPPx][PPPPPPP-SSS]
Score: 0
User: Winzzwz
Problemset: ดูวีทูปเบอร์
Language: cpp
Time: 0.003 second
Submitted On: 2025-03-09 10:55:34
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int d1,m1,d2,m2;
int months[20] = {-1,31,28,31,30,31,30,31,31,30,31,30,31};
int main() {
cin.tie(0)->sync_with_stdio(0);
cin >> d1 >> m1 >> d2 >> m2;
int cnt = 0;
while (d1 != d2 || m1 != m2) {
cnt++;
d1++;
if (d1%months[m1] == 0) {
m1++;
d1 = 0;
}
//cout << d1 << " " << m1 << "\n";
}
cout << (cnt+1)*3;
return 0;
}