Submission

Status:

[PPPP][PPPPPPPPPPP]

Subtask/Task Score:

{30/30}{70/70}

Score: 100

User: JedSKY

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

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-14 09:32:02

#include <bits/stdc++.h>
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int daysinmonth[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

    int d1, m1, d2, m2;
    cin >> d1 >> m1;
    cin >> d2 >> m2;

    auto toDay = [&](int d, int m) {
        int total = 0;
        for (int i = 1; i < m; i++) total += daysinmonth[i];
        total += d;
        return total;
    };

    int day1 = toDay(d1, m1);
    int day2 = toDay(d2, m2);

    int numDays = day2 - day1 + 1;
    cout << numDays * 3 << "\n";

    return 0;
}