哪里错了?

P2010 [NOIP2016 普及组] 回文日期

llljjjqqq @ 2017-11-07 22:04:10

#include<stdio.h>
int d[15]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int main()
{
    int n,m;
    scanf("%d %d",&n,&m);
    int ans=0;
    for(int i=n/1000;i<=m/1000;i++)
    {
        int c=i%10*1000+i/10%10*100+i/100%10*10+i/1000;
        if(c/100<=12&&c%100<=d[c/100])
        ans++;
    }
    printf("%d",ans);
}

|