HDU 1492 The number of divisors(约数) about Humble Numbers(数论,简单约数)
The number of divisors(约数) about Humble Numbers
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1623 Accepted Submission(s): 789
Now given a humble number, please write a program to calculate the number of divisors about this humble number.For examle, 4 is a humble,and it have 3 divisors(1,2,4);12 have 6 divisors.
#include<stdio.h> int main() {long long n;int p2,p3,p5,p7;while(scanf("%I64d",&n),n){p2=p3=p5=p7=0;while(n%2==0){n/=2;p2++;} while(n%3==0){n/=3;p3++;} while(n%5==0){n/=5;p5++;} while(n%7==0){n/=7;p7++;} printf("%d\n",(p2+1)*(p3+1)*(p5+1)*(p7+1));} return 0; }
HDU 1492 The number of divisors(约数) about Humble Numbers(数论,简单约数)相关推荐
- HDU 1492 The number of divisors(约数) about Humble Numbers
The number of divisors(约数) about Humble Numbers Time Limit: 2000/1000 MS (Java/Others) Memory Limit: ...
- 杭电1492 The number of divisors(约数) about Humble Numbers
The number of divisors(约数) about Humble Numbers Time Limit: 2000/1000 MS (Java/Others) Memory Lim ...
- HDUOJ---The number of divisors(约数) about Humble Numbers
The number of divisors(约数) about Humble Numbers Time Limit: 2000/1000 MS (Java/Others) Memory Lim ...
- HDU1492 The number of divisors(约数) about Humble Numbers【约数】
The number of divisors(约数) about Humble Numbers Time Limit: 2000/1000 MS (Java/Others) Memory Lim ...
- HDU 3826 Squarefree number:题目解答源码
2019独角兽企业重金招聘Python工程师标准>>> HDU 3826 Squarefree number:题目解答源码 In mathematics,a squarefree n ...
- 第F题 真约束之和(通解)古希腊数学家毕达哥拉斯在自然数研究中发现,220的所有真约数(即不是自身的约数)之和为: 1+2+4+5+10+11+20+22+44+55+110=284
古希腊数学家毕达哥拉斯在自然数研究中发现,220的所有真约数(即不是自身的约数)之和为: 1+2+4+5+10+11+20+22+44+55+110=284. 而284的所有真约数为1.2.4.71. ...
- 真约数求法 c语言,怎样求真约数
匿名用户 1级 2018-11-14 回答 约数 定义 如果一个整数能被另一个整数整除,那么第二个整数就是第一个整数的约数.约数是有限的,一般用最大公约数. (在自然数的范围内) 6的约数有:1.2. ...
- 约数的一些定理——数论
算术基本定理: 又称为正整数的唯一分解定理,即:每个大于1的自然数,要么本身就是质数,要么可以写为2个或以上的质数的积,而且这些质因子按大小排列之后,写法仅有一种方式. 公式:A=(p1^k1 ...
- 【HDU】1005 Number Sequence (有点可爱)
http://acm.hdu.edu.cn/showproblem.php?pid=1005 A number sequence is defined as follows: f(1) = 1, f( ...
最新文章
- 解决【Bootstrap‘s JavaScript requires jQuery】的问题
- ES5原生api(2)
- linux 文件重命名_Linux编程 5 (目录重命名与移动 删除,目录创建删除,查看file)...
- 大学计算机学生成绩综合管理系统,大学综合测评成绩管理系统的研究 计算机专业毕业论文.doc...
- 吴恩达深度学习 —— 作业2
- java manager 模式_java设计模式之装饰器模式(Decorator)
- vivado 下载bit报错End of startup status:LOW
- 【虹科车用总线技术】PCAN-USB使用手册
- 计算机的源端口号是你根据,网络协议的判定是根据源端口还是目的端口?
- 数据增强_炼丹笔记三:数据增强
- 在java中调用mockjs生成模拟数据
- adams打不开提示msc license_adams安装后打不开
- matlab portcons,马科维茨投资组合理论(均方模型)学习笔记——基于Matlab(二)...
- 解决Hadoop Browse Directory Couldn‘t upload the file 错误.无法上传文件
- 什么是1u服务器;服务器中的u是什么意思
- PyPI--python软件仓储库
- 4点策略教你如何做好社群营销
- 总有一款适合你的协同设计工具
- 8大底层逻辑,提升思维能力
- 期中计算机网络答案,计算机网络基础自考试题「附答案」