UVA11388 GCD LCM Description of the title PDF The GCD of two positive integers is the largest integer that divides both the integers without any remainder. The LCM of two positive integers is the smallest positive integer that is divisible by both th…
占坑 先贴上AC代码 回头来补坑 #include <iostream> using namespace std; int n, k; const int mod = 100003; long long f[1000000]; int main() { cin >> n >> k; f[0] = 1; for (int i = 1; i <= n; i++) { if (i <= k) { //当 当前阶梯 小于一次性可以跨越的阶梯的时候 for (int…
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int maxn = 3e6 + 3; int t, n, cnt; bool v[maxn]; short mu[maxn]; int isp[maxn], phi[maxn]; LL sum1[maxn]; int sum2[maxn]; unordered_map<int,LL> dp1; unordered_map<int…