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): 3033 Accepted Submission(s):
1465
called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15,
16, 18, 20, 21, 24, 25, 27, ... shows the first 20 humble numbers.
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.
case consists of one humble number n,and n is in the range of 64-bits signed
integer. Input is terminated by a value of zero for n.
per case.
#include <cstdio>
#include <iostream>
using namespace std;
int main()
{
long long n;
while(cin>>n&&n)
{
long long a[]={,,,};
int b[]={,,,},i;
for(i=;i<;i++)
{
while(n%b[i]==)
{
a[i]++;
n=n/b[i];
}
}
cout<<a[]*a[]*a[]*a[]<<endl;
}
}
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 ...
- HDU1492/The number of divisors(约数) about Humble Numbers
题目连接 The number of divisors(约数) about Humble Numbers Time Limit: 2000/1000 MS (Java/Others) Memory L ...
- HDUOJ---The number of divisors(约数) about Humble Numbers
The number of divisors(约数) about Humble Numbers Time Limit: 2000/1000 MS (Java/Others) Memory Lim ...
- 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 ...
随机推荐
- js 非IE火狐插件检测
js检测代码Html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// ...
- Linux免SSH密码登录
SSH免密码登录,做个总结吧! 1.安装SSH服务(略过) 2.场景:需要配置主机A无密码登录主机B 在主机A上执行如下: cd ~/.ssh ssh-keygen -t rsa 生成密钥文件 cp ...
- Netbeans7.4下搭建struts2.3.16
一:所需要的jar包如下: 在WEB-INF目录下新建一个lib文件夹将jar包复制到里面: 在这里要注意将jar包导入lib目录里还不可以,在这里与MyEclipse不同.在项目上右键属性-> ...
- poj2505-A multplication game
题意:两个人轮流用2~9来乘n,使n不断扩大,n开始为1.当给一个固定值k,谁先使n超过k谁赢. 分析:能到达必败态的状态为必胜态,只能到达必胜态的状态为必败态.对于给定的k,n>=k时为必败态 ...
- LeetCode_Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing ...
- LeetCode_Set Matrix Zeroes
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. 很挫的一个想 ...
- cmake编译Debug和Release
CMake 中有一个变量 CMAKE_BUILD_TYPE ,可以的取值是 Debug Release Rel WithDebInfo 和 MinSizeRel.当这个变量值为 Debug 的时候,C ...
- elasticsearh 中每个节点中需要有相同的插件
elasticsearh 中每个节点中需要有相同的插件 [2016-09-13 19:25:24,049][INFO ][discovery.zen ] [node02] failed to send ...
- logstash 防止实际处理时间跟事件产生时间略有偏差
"message" => " 10.168.255.134 [12/Sep/2016:16:30:40 +0800] \"GET /resources/p ...
- javascript遍历Json对象个数
var data={}; for (var d in data) { $(data[d]).each(function (i, e) { aler ...