摘要: 大神博客链接 [https://blog.csdn.net/zhjchengfeng5/article/details/7786595 ] 代码 include include include include include include include include include defin 阅读全文
posted @ 2018-09-27 17:58 ChunhaoMo 阅读(384) 评论(0) 推荐(0) 编辑
摘要: 基本概念 来自百度百科, 求解 x,y的方法的理解 设 a b。 1,显然当 b=0,gcd(a,b)=a。此时 x=1,y=0; 2,a b 0 时 设 ax1+ by1= gcd(a,b); bx2+ (a mod b)y2= gcd(b,a mod b); 根据朴素的欧几里德原理有 gcd(a 阅读全文
posted @ 2018-09-27 16:36 ChunhaoMo 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 一些定义 欧拉函数是少于或等于n的数中与n互质的数的数目。 欧拉函数的性质:它在整数n上的值等于对n进行素因子分解后,所有的素数幂上的欧拉函数之积。 欧拉函数的值 通式:φ(x)=x(1 1/p1)(1 1/p2)(1 1/p3)(1 1/p4)…..(1 1/pn),其中p1, p2……pn为x的 阅读全文
posted @ 2018-09-27 15:55 ChunhaoMo 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 任意大于1的正整数都可以表示为其质因子的乘积 代码实现 include include include using namespace std; define ll long long ll a[100000]; int main(){ ll n,i; ios::sync_with_stdio(fa 阅读全文
posted @ 2018-09-27 15:53 ChunhaoMo 阅读(119) 评论(0) 推荐(0) 编辑