1 不是质数
#include <cstdio>
#include <vector>
#include <unordered_set>
#include <functional>
// #include <bits/stdc++.h>
using namespace std;
using ll = long long;
bool isZs(ll x) {
for (ll i = 2; i * i <= x; ++i)
if (x % i)
continue;
else
return false;
return x > 1;
}
int main() {
unordered_set<ll> zs = {2, 3, 5, 7};
ll res = 0;
for (ll i = 1; i <= 20210605; ++i) {
if ( isZs(i) ) {
ll x = i;
while (x) {
if (!zs.count(x % 10))
goto NO;
x /= 10;
}
++res;
// printf("%d Yes\n", i);
NO:
;
}
}
printf("%lld\n", res);
return 0;
}
1 回复
0 转发
0 喜欢
9 阅读



