1633629364zhukuan @ 2017-08-16 21:31:11
#include<bits/stdc++.h>
using namespace std;
int y[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int i,j,n,k,s;
int r1,r2;
int main()
{
cin>>r1>>r2;
for(i=1;i<=12;i++)
for(j=1;j<=y[j];j++)
{
n=1000*(j%10)+100*(j/10)+(i%10)*10+(i/10);
k=n*10000+i*100+j;
if(r1>k||k>r2) continue;
s+=1;
}
cout<<s<<endl;
return 0;
}
by SD191553 @ 2017-08-17 17:13:07
for(int j=1;j<=y[i];j++)
by SD191553 @ 2017-08-17 17:14:17
注意下是y[i],因为是小于月的天数,但样例没有测出这个错来
by 1633629364zhukuan @ 2017-08-24 11:42:52
已更正。多谢指教。