Submission

Status:

[PPP-][PPPPPPPPPPP]

Subtask/Task Score:

{0/30}{70/70}

Score: 70

User: s

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-09-22 17:11:25

#include<iostream>
using namespace std ;
int main() {
	int d_1,m_1,d_2,m_2 ;
	int dim[12]={31,28,31,30,31,30,31,31,30,31,30,31},di=0 ;
	cin >> d_1 >> m_1 >> d_2 >> m_2 ;
	if(m_1==m_2) {
		cout << (d_2-d_1+1)*3 ;
	} else {
		for(m_1;m_1<m_2-1;m_1++) {
    		di+=dim[m_1] ;
    	}
		cout << (di+dim[m_1-1]-(d_1-1)+d_2)*3 ;
	}
}