Submission
Status:
[P-SS][PPPPPPPPPPP]
Subtask/Task Score:
{0/30}{70/70}
Score: 70
User: APNICHANAN
Problemset: ดูวีทูปเบอร์
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-10 10:11:02
#include <iostream>
using namespace std;
int main()
{
int d1 , m1 ,d2 ,m2 , day ;
int months[12] = {31,28,31,30,31,30,31,31,30,31,30,31} ;
cin >> d1 >> m1 >> d2 >> m2 ;
day = months[m1-1] - d1 + 1 ;
for (int i = m1 + 1 ; i < m2 ; i++){
day += months[i-1] ;
}
if (m1 != m2)
day += d2 ;
cout << day * 3 ;
}