int x = 0, f = 1; char c = getchar(); while (c < '0' || c > '9') { if (c == '-') f = -1; c = getchar(); } while ( c >= '0' && c <= '9') { x = x * 10 + c - '0'; c = getchar(); } return x * f; } inline long long LLread() { long...
CCFCSP202312-2因子化简 (质数筛法)C/C++ 满分 C/C++题解: 具体思路:先用质数筛法找到1000以内的全部质数,然后逐一处理即可 #include<bits/stdc++.h>using namespace std;int q;long long n,k,ans;vector<long long> Sushu;void is_prime(){ bool isPrime[1001];for(int i=2;i<=1000;i++){isPrime[...