poj 3604 Professor Ben(质因数分解)
来源:互联网 发布:java解压zip文件jar包 编辑:程序博客网 时间:2024/05/16 10:58
poj 3604 Professor Ben
题解
#include<stdio.h>#include<string.h>int main(){int cas,n;scanf("%d",&cas);while(cas--){scanf("%d",&n);int ans=1;for(int i=2;i*i<=n;i++)if(n%i==0){int cnt=0;while(n%i==0){cnt++;n/=i;}int t=(1+cnt+1)*(cnt+1)/2;ans*=t*t;}if(n>1) ans*=9;printf("%d\n",ans);}return 0;}
0 0
- poj 3604 Professor Ben(质因数分解)
- POJ 3604 Professor Ben
- POJ 3604 Professor Ben
- POJ 3604 Professor Ben
- POJ 3604 Professor Ben 数论
- poj 3604 Professor Ben 因子
- POJ 3604 Professor Ben(合数唯一分解,筛法素数表)
- poj 3604 Professor Ben 组合计数
- Professor Ben POJ
- Professor Ben 唯一分解定理:因子的因子个数
- POJ 1142 质因数分解
- pku 3604 Professor Ben 积性函数加筛法
- POJ 1142 分解质因数练习
- POJ NOI0105-43 质因数分解
- POJ3604 Professor Ben[线性筛/暴力]
- poj 1811 (素数判定+质因数分解)
- poj 1091 跳蚤(分解质因数+容斥)
- POJ 1142 Simith Numbers(质因数分解)
- perl mysql
- XML解析中SAX和XMLpull的区别
- android自定义日历
- 网站安全控制
- how to append an option to Jquery Ui MultiSelect Plugin
- poj 3604 Professor Ben(质因数分解)
- 关于C#调用C++动态库中的内存对齐的讲解
- 2014/8/2 记
- ZOJ 1642 Match for Bonus(dp)
- bioperl
- Tablespace for table '`pomelo`.`bag`' exists. Please DISCARD the tablespace before IMPORT.
- mac os mysql data location
- make install
- mysql 连接池