HDUOJ---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): 2039 Accepted Submission(s): 1002
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.
12
0
6
//http://acm.hdu.edu.cn/showproblem.php?pid=1492
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
_int64 i,n,c1,c2,c3,c4; while(scanf("%I64d",&n),n)
{
for(c1=,i=n;i%==&&i!=;i/=)
c1++;
for(c2=,i=n;i%==&&i!=;i/=)
c2++;
for(c3=,i=n;i%==&&i!=;i/=)
c3++;
for(c4=,i=n;i%==&&i!=;i/=)
c4++;
printf("%I64d\n",c1*c2*c3*c4);
}
return ;
}
HDUOJ---The number of divisors(约数) about Humble Numbers的更多相关文章
- The number of divisors(约数) about Humble Numbers[HDU1492]
The number of divisors(约数) about Humble Numbers Time Limit: 2000/1000 MS (Java/Others) Memory Lim ...
- 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 L ...
- HDU - The number of divisors(约数) about Humble Numbers
Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence ...
- HDU-1492-The number of divisors(约数) about Humble Numbers -求因子总数+唯一分解定理的变形
A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, ...
- hdu-1492 The number of divisors(约数) about Humble Numbers---因子数公式
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1492 题目大意: 给出一个数,因子只有2 3 5 7,求这个数的因子个数 解题思路: 直接求出指数即 ...
- [poj2247] Humble Numbers (DP水题)
DP 水题 Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The se ...
- A - Humble Numbers
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Pract ...
- Humble Numbers
Humble Numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9988 Accepted: 4665 Descri ...
随机推荐
- 使用supervisor过程的坑
1.安装:由于使用的是公司的虚拟机,所以使用pip install supervisor的过程遇到很多权限问题. 中间尝试使用sudo pip install supervisor的方式安装,但是使用 ...
- 【BZOJ】【3668】【NOI2014】起床困难综合症
贪心 位运算的题……基本都是按位来做的?... 从高位到低位,贪心来搞就可以了…… 这都算不上是数位DP吧= = /****************************************** ...
- Android -- 跳转应用市场评分
Code Uri uri = Uri.parse("market://details?id="+getPackageName()); Intent intent = new Int ...
- 【HBase】学习笔记
HBASE 1 简介 1.1 官网 1.1.1 http://hbase.apache.org/ 1.1.2 Apache HBase™ is the Hadoop database, a distr ...
- linux pdb调试总结
1.首先gdb编译: gcc -g xxx.c -o xxx 2.然后 gdb xxx进入调试 break 行号 加入断点 (1)然后run就能够跑到下一个断点 (2)step(或s)单步跟踪 (3) ...
- C#.NET常见问题(FAQ)-如何清空stringbuilder
就红色的代码可以: System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("hello" ...
- C#.NET常见问题(FAQ)-如何强制退出进程
可以使用Process.Kill方法,但是有时候执行完了该进程还在,要等一会才会自动关掉 更多教学视频和资料下载,欢迎关注以下信息: 我的优酷空间: http://i.youku.com/ac ...
- VB.NET版机房收费系统---外观层怎样写
外观设计模式.<大话设计模式>第103页具体解说,不记得这块知识的小伙伴能够翻阅翻阅,看过设计模式,敲过书上的样例,仅仅是学习的第一步,接着,假设在我们的项目中灵活应用,把设计模式用出花儿 ...
- Python编程-基础知识-条件判断
1. 简单的if/else条件判断 judge_flow.py name = input("Please input name: ") if name == 'master': p ...
- WPF 同一个程序 只允许 同时运行一个
方法2 当程序已经运行了 再运行这个程序时,则显示当前这个窗体 http://code.3rbang.com/cshape-run-one/ VS2013附件:http://fil ...