2020牛客多校第四场 B

2020牛客多校第四场 Bc++ 解法: 若是要最优,必需要使gcd的次数最多。 已知x=p1k1p2k2… 咱们可让y=gcd(i,x)=p1k1-1p2k2… 以此类推,最多能够执行(k1+k2+…kn)次。web #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e6; b
相关文章
相关标签/搜索