#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; }
注册一个 HydroOJ 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 HydroOJ 通用账户