
数论--因子
淼润淽涵
这个作者很懒,什么都没留下…
展开
-
一个数的因子、因数的区别
因子就是所有可以整除这个数的数,不包括这个数自身.而因数就是所有可以整除这个数的数,但包括这个数自身.一个数的因子、因数的区别因数包括这个数本身而因子不包括例:15的因子是1,3,5 而因数为1,3,5,15. 20的因子是1,2.4,5 ,10而因数为1,2.4,5 ,10,20完数完数是指此数的所有因子之和等于此数,例如:...原创 2019-12-17 09:35:53 · 10876 阅读 · 0 评论 -
Codeforces 959-D Mahmoud and Ehab and another array construction task (贪心思想)
Problem DescriptionMahmoud has an array a consisting of n integers. He asked Ehab to find another array b of the same length such that: b is lexicographically greater than or equal to a. b...原创 2019-05-07 23:27:46 · 218 阅读 · 0 评论 -
求一个数因子个数和因子和(避免超时法)
求一个数的因子个数int count(int n){ int s=1; for(int i=2;i*i<=n;i++){ if(n%i==0){ int a=0; while(n%i==0){ n/=i; a++; }...原创 2019-08-02 18:22:15 · 504 阅读 · 0 评论