Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
33340 | 林芳菲 | 【J】T2小清新判断题 | C++ | 通过 | 100 | 76 MS | 260 KB | 595 | 2024-10-07 17:16:04 |
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; typedef long long LL; int main() { int q, x; scanf("%d", &q); while (q--) { scanf("%d", &x); int cnt = 0; for (int i = 2; i * i <= x; i++) if (x % i == 0) { cnt++; if (cnt >= 2) break; while (x % i == 0) x /= i; } if (x > 1) cnt++; if (cnt >= 2) cout << "Yes" << endl; else cout << "No" << endl; } return 0; }