【数论】分数拆分

思路

1/k=1/x+1/y;
然后x>=y,枚举y从k+1到2* k。
因为x==y的情况是1/k=1/(k * 2)+1/(k *2)

code
#include<cstdio>
int k,ans=0;
int main(){
	scanf("%d",&k);
	for(int i=k+1;i<=2*k;++i)
	  if((i*k)%(i-k)==0) ++ans;
	printf("%d",ans);
}

相关文章:

  • 2021-06-08
  • 2021-05-27
  • 2021-10-11
  • 2022-02-13
  • 2022-12-23
猜你喜欢
  • 2021-10-06
  • 2022-12-23
  • 2022-02-22
  • 2021-11-22
相关资源
相似解决方案