You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
310 B
19 lines
310 B
#include<bits/stdc++.h>
|
|
using namespace std;
|
|
int year,month,date,ans;
|
|
int main() {
|
|
int a[13]= {0,31,28,31,30,31,30,31,31,30,31,30,31};
|
|
cin>>year>>month>>date;
|
|
for(int i=1; i<month; i++)
|
|
ans+=a[i];
|
|
|
|
ans+=date;
|
|
if(year%4==0 and year%100!=0 or year%400==0)
|
|
if(month>2) ans++;
|
|
cout<<ans;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|