摘要:
POJ 2407 题意: 给出一个数n, n ≤ 1e9, 问有多少个数 a, 1 ≤ a < n, 使得不存在 x > 1, y > 0, z > 0, n = xy, a = xz. 思路: 实际上问比 n 小且与 n 互质的数的个数, 求欧拉函数. view code #include <al 阅读全文
摘要:
Codeforces 2019年12月19日到 2020年2月12日 的部分比赛题 Educational Codeforces Round 82 (Rated for Div. 2) D Fill The Bag 给出m(≤1e5)个盒子,盒子的大小是2的幂次。可以选择把一个盒子分成大小相同的两部 阅读全文
摘要:
数学问题的解题窍门 辗转相除法 AOJ 0005 输入2个数,输出它们的gcd和lcm 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 int gcd(int a, int b) { 5 if (b == 0) return a; 6 re 阅读全文
摘要:
A ConneR and the A.R.C. Markland-N 1 #include <bits/stdc++.h> 2 using namespace std; 3 #define ll long long 4 #define inc(i, l, r) for (int i = l; i < 阅读全文