zoj 3622
来源:互联网 发布:淘宝无线优惠券 编辑:程序博客网 时间:2024/05/02 01:12
素数唯一分解定理
#include <iostream>#include <math.h>using namespace std;long long f[15][110];int t[110];int main(){long long m,n;for(int i=1;i<=10;i++){t[i]=0;for(int j=0;j<=i;j++){for(int k=0;k<=i;k++){long long x=(long long)(pow(2,double(j))*pow(5,double(k)));if(x<(long long)pow(10,double(i))&&x>=(long long)pow(10,double(i-1))) f[i][t[i]++]=x;}}}while(cin>>m>>n){int tot=0,tm=0,tn=0;int cm=m,cn=n;while(cm){tm++;cm/=10;}while(cn){tn++;cn/=10;}for(int i=tm;i<=tn;i++){for(int j=0;j<t[i];j++){if(f[i][j]>=m&&f[i][j]<=n) tot++;}}cout<<tot<<endl;}return 0;}
- zoj 3622
- zoj 3622 Magic Number
- zoj Majic Number(3622)
- zoj 3622 Magic Number
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- 字符串函数库
- ActionContext和ServletActionContext小结 (包含IoC和非ioc方式获取request等)
- Five Minds for the Future: Mental Building Blocks for the New Century
- ThinkPHP数据分页实战
- JAVA 正则表达式
- zoj 3622
- East Meets West: How the Brain Unites Us All
- 中国当代黑社会大哥排行
- struts2+ajax+json
- Restaurant LA4851
- 使用JavaScript库还是自写代码
- 2012年BNU新生程序设计大赛解题报告【非官方版】
- T-SQL 查询优化之扫描搜寻
- wm_ncpaint消息