123

高一六  •  11个月前


include<bits/stdc++.h>

include

using namespace std; int main(){

int a,b,c,d,z; cin>>a>>b>>c;

if((a%4==0&&a%100!=0)||(a%400==0)){

if(b==1){
z=c;

}

else if(b==2){
z=31+c;

}

else if(b==3){
z=60+c;

} else if(b==4){

z=91+c;

} else if(b==5){

z=121+c;

} else if(b==6){

z=152+c;

} else if(b==7){

z=183+c;

} else if(b==8){

z=214+c;

} else if(b==9){

z=244+c;

} else if(b==10){

z=275+c;

} else if(b==11){

z=305+c;

} else if(b==12){

z=336+c;

}

if((z>=312&&z<=366)||(z>=0&&z<=33)){
    if(z>=312&&z<=366){
	   cout<<"Winter"<<" "<<"88"<<" "<<z-311;
}
    else if(z>=0&&z<=33){
    	cout<<"Winter"<<" "<<"88"<<" "<<z+366-311;
	}
}
else if(z>=34&&z<=125){
	cout<<"Spring"<<" "<<"92"<<" "<<z-33;
}
else if(z>=126&&z<=220){
	cout<<"Summer"<<" "<<"94"<<" "<<z-125;
}
else if(z>=221&&z<=311){
	cout<<"Autumn"<<" "<<"92"<<" "<<z-219; 
}

}

else{

 if(b==1){
z=c;

}

 else if(b==2){
z=31+c;

}

 else if(b==3){
z=59+c;

}

 else if(b==4){
z=90+c;

}

 else if(b==5){
z=120+c;

}

  else if(b==6){
z=151+c;

}

  else if(b==7){
z=182+c;

}

 else if(b==8){
z=213+c;

} else if(b==9){

z=243+c;

} else if(b==10){

z=274+c;

} else if(b==11){

z=304+c;

} else if(b==12){

z=335+c;

}

if((z>=311&&z<=365)||(z>=0&&z<=33)){
    if(z>=311&&z<=365){
	   cout<<"Winter"<<" "<<"88"<<" "<<z-311;
}
    else if(z>=0&&z<=33){
    	cout<<"Winter"<<" "<<"88"<<" "<<z+365-310;
	}
}
else if(z>=34&&z<=124) {
	cout<<"Spring"<<" "<<"91"<<" "<<z-33;
}
else if(z>=125&&z<=219){
	cout<<"Summer"<<" "<<"94"<<" "<<z-124;
}
else if(z>=220&&z<=310){
	cout<<"Autumn"<<" "<<"92"<<" "<<z-219; 
}
  

} return 0; }


评论:

请先登录,才能进行评论