1 条题解

  • 0
    @ 2023-11-6 15:36:41
    #include<stdio.h>
    
    int main(){
        int n, cnt=0; scanf("%d", &n);
        long long x;
        for(int i=1; i<=n; i++){
            scanf("%lld", &x);
            if(x%7==0) cnt ++; 
            else{ // 7 in x ?
                while(x) {
                    if(x%10 == 7) { cnt ++; break; }
                    x /= 10;
                }
            }
        }
        printf("%d\n", cnt);
        return 0;
    }
    
    • 1

    信息

    ID
    67
    时间
    1000ms
    内存
    64MiB
    难度
    7
    标签
    递交数
    250
    已通过
    64
    上传者