整除(小学奥数内容)

  有关性质: 传递性、同乘性、以及一些显然的性质。

        还有b|0对于所有b≠0成立。

        若(a,b)=1,a|n,b|n,则(ab)|n;

 

 

 相关姿势:求出x的所有因子。这个应该没有更好的复杂度了。

void getd(int x){
  for(int i=1;i*i<=x;++i)
    if(x%i==0){
      d[++tot]=i;
      if(i*i!=x)d[++tot]=x/i;
    }
  //sort(d+1,d+tot+1);
}
求因子

相关文章:

  • 2021-06-05
  • 2021-04-05
  • 2021-07-19
  • 2022-02-20
  • 2022-12-23
  • 2021-07-29
  • 2022-01-15
  • 2022-02-01
猜你喜欢
  • 2022-12-23
  • 2022-01-06
  • 2021-04-15
  • 2022-12-23
  • 2021-08-10
相关资源
相似解决方案