这难度标准我就很迷,为什么这种题也能是中等难度啊

#include<stdio.h>

int seven(int a){

if(a%7==0)return 1;
while(a!=0){
    if(a%10==7)return 1;
    a/=10;
}
return 0;

}

int main(){

int number;
while(scanf("%d", &number) != EOF){
    int ans=0;
    if(number!=0){
        for(int i=1; i<=number; i++){
            ans+=seven(i);
        }
    }
    printf("%d\n", ans);
}

}