Submission

Status:
[PPPP][PPPPPPPPPPP]

Score: 100

User: Winkrittapas2550gmail.com

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

Language: cpp

Time: 0.002 second

Submitted On: 2024-09-23 15:28:26

#include<bits/stdc++.h>
using namespace std ;
int main() {
	int d1,d2,m1,m2,a ;
	int sum = 0;
	cin >> d1 >> m1 ;
	cin >> d2 >> m2 ;
	sum = -1*d1;
	while (m1 < m2){
		if (m1== 1||m1==3||m1==5||m1==7||m1==8||m1==10) a=31;
		else if (m1==2) a=28;
		else if (m1==4||m1==6||m1==9||m1==11){
			a=30 ;
		}
	    m1+=1;
	    sum=sum+a;
	}
	sum=(sum+d2+1)*3;
	cout << sum ;
}