[OpenJudge-NOI]连乘积末尾0的个数
来源:互联网 发布:window7怎么连接网络 编辑:程序博客网 时间:2024/06/05 02:33
代码
#include <cstdio>#include <iostream>#include <cstring>using namespace std;int a,b;int main() { cin>>a>>b; int i1(0),i2(0); for(int i=a;i<=b;i++) { int x; x=i; while(x%2==0&&x!=0){ x/=2; i1++; } x=i; while(x%5==0&&x!=0){ x/=5; i2++; } } if(i1>i2) cout<<i2; else cout<<i1; }
0 0
- [OpenJudge-NOI]连乘积末尾0的个数
- POJ NOI MATH-7657 连乘积末尾0的个数
- [OpenJudge-NOI]幂的末尾 快速幂
- [OpenJudge-NOI]乘积最大的拆分
- 【DP】 noi openjudge 2.6 乘积最大
- 末尾0的个数
- 末尾0的个数
- 末尾0的个数
- 末尾0的个数
- 末尾0的个数
- 末尾0的个数
- 输出L内所有数字的乘积末尾0的个数
- N!末尾0的个数
- 阶乘末尾0的个数
- n!末尾0的个数.
- N!末尾0的个数
- n!末尾0的个数
- 阶乘末尾 0 的个数
- 分组转换时延的计算
- 1005. Spell It Right (20)
- [OpenJudge-NOI]乘积最大的拆分
- [LeetCode] Longest Substring Without Repeating Characters
- 鼎智收购北斗星手机网 推全新手机品牌青葱
- [OpenJudge-NOI]连乘积末尾0的个数
- 1006. Sign In and Sign Out (25)
- eclipse不能写入classpath
- [OpenJudge-NOI]质数的和与积
- POJ——3253 Fence Repair(优先队列)
- 1007. Maximum Subsequence Sum (25)
- javaWeb--API 自动化测试框架分享
- 周鸿祎携奇酷手机999元“射杀”行业暴利
- 16G内存的iPhone手机能扩容?是真的 暴力拆机失质保! 值得吗?