求助!!!73分,两个re,一个wa
查看原帖
求助!!!73分,两个re,一个wa
263122
Sean树召楼主2021/10/7 10:04
#include<bits/stdc++.h>
using namespace std;
int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int y11,y2;
int x,y; 
int ans; 
void hw(int n){
	if((n/10000000==n%10)&&(n/1000000%10==n/10%10)&&(n/100000%10==n/100%10)&&(n/10000%10==n/1000%10)){
		ans++;
		return ;
	}else{
		return ;
	}
}
int main(){
	cin>>x>>y;
	y11=x/10000;
	y2=y/10000;
	hw(x);
	while(x<=y){
		x++;
		if(x%100>a[x%10000/100]){
			while(x%100>1){
				x--;
			}
			x+=100; 
		}
		if(x%10000/100>12){
			x-=1200;
			x+=10000;
		}
		hw(x);
	//	cout<<x<<endl;
	}
	cout<<ans;
	return 0;
}


帮我指出一下什么问题呗,谢谢啦 (还有,那个紫色的re什么意思)

2021/10/7 10:04
加载中...