首页 > 其他 > 详细

南阳oj 阶乘因式分解

时间:2018-07-22 21:56:20      阅读:192      评论:0      收藏:0      [点我收藏+]

#include<iostream>
using namespace std;
int main ()
{
int t;
cin>>t;
while(t--)
{
int n,m;
int count=0;
cin>>n>>m;
while(n/m!=0)
{
count=count+n/m;
int tmp;
n=n/m;
}
cout<<count<<endl;
}
return 0;
}

 

还记得之前第一次做这道题的时候是学长讲课

现在已经明白了原理和技巧,开心ing

南阳oj 阶乘因式分解

原文:https://www.cnblogs.com/huanya/p/9351581.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!