#include <stdio.h>
int cal(int n,int p)
{//计算n!中有多少个质因子p
int ans=0;
while(n!=0)
{
ans+=n/p;
n/=p;
}
return ans;
}
计算n!中质因子p的个数
猜你喜欢
转载自blog.csdn.net/weixin_43370733/article/details/103789385
今日推荐
周排行