Reywmp @ 2017-10-16 23:05:27
//70分
#include<cstdio>
int x,y,n,a,s,sum=0,m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int main()
{
scanf("%d%d",&x,&y);
for(int i=1;i<=12;i++)
{
for(int j=1;j<=m[j];j++)
{
a=i/10;
n=10000*(((j%10)*1000)+((j/10)*100)+((i%10)*10)+(i/10));
s=n+i*100+j;
if(s<x||s>y) continue;
sum++;
}
}
if(92200229>y||92200229<x)
{
printf("%d",sum);
}
else
{
printf("%d",++sum);
}
}