90分#8没过
查看原帖
90分#8没过
521283
wangif424楼主2022/7/25 23:04
#include<bits/stdc++.h>
using namespace std;
int m,r,ans;
int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int main(){
	scanf("%d-%d",&m,&r);
	if(m>12){
		if(m%10==1){
			m=1;
		}
		else if(m%10==2){
			m=12;
		}
		else if(m%10==0){
		    m=10;
		}
		else{
		    m%=10;
		}
		ans++;
	}
	if(r!=month[m])ans++;
	cout << ans;
	return 0;
}
2022/7/25 23:04
加载中...