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 ...
随机推荐
- [POJ] 3368 / [UVA] 11235 - Frequent values [ST算法]
2007/2008 ACM International Collegiate Programming Contest University of Ulm Local Contest Problem F ...
- SGU 294 He's Circles
题意:一个项链有n个珠子,每个珠子为黑色或白色.问有多少种不同的项链? 注意,n的数量十分大,因此,我们枚举i(1<=i<=n),令L=n/i,求出L的欧拉函数,则这些数和L互质,因此gc ...
- Powershell --在线学习
介绍和安装 自定义控制台 快速编辑模式和标准模式 快捷键 管道和重定向 Powershell交互式 数学运算 执行外部命令 命令集 别名 通过函数扩展别名 执行文件和脚本 Powershell变量 定 ...
- android showAsDropDown的用法属性介绍
使用PopupWindow可实现弹出窗口效果,,其实和AlertDialog一样,也是一种对话框,两者也经常混用,但是也各有特点.下面就看看使用方法.首先初始化一个PopupWindow,指定窗口大小 ...
- java设计模式--结构型模式--代理模式
代理模式 概述 为其他对象提供一种代理以控制对这个对象的访问. 适用性 1.远程代理(RemoteProxy)为一个对象在不同的地址空间提供局部代表. 2.虚代理(VirtualProxy)根据需要创 ...
- poj 2288 Islands and Bridges_状态压缩dp_哈密尔顿回路问题
题目链接 题目描述:哈密尔顿路问题.n个点,每一个点有权值,设哈密尔顿路为 C1C2...Cn,Ci的权值为Vi,一条哈密尔顿路的值分为三部分计算: 1.每一个点的权值之和 2.对于图中的每一条CiC ...
- 【POJ1005】I Think I Need a Houseboat
说是计算几何,其实是一道水题.直接算半圆面积即可. #include <iostream> #include <cstdlib> #include <cstdio> ...
- <转载>linux gcc编译器中使用gdb单步调试程序,程序不是顺序执行的。
原文地址http://blog.csdn.net/abc78400123/article/details/6779108 在用gdb调试,使用s 或n单步执行程序时,发现程序不是按顺序运行的,有时莫名 ...
- SharePoint excel service web part 连接到 filter web part
本文讲述SharePoint excel service web part 连接到 filter web part的一个简单应用场景. SharePoint excel service web par ...
- 数据库中的索引Index
索引就像一本书的目录,而书中的索引是对一个词语的列表,其中注明了包含各个词的页码.数据库中的索引 是某一个表中一列或者若干列值的集合和相应的只想表中物理标识这些值的数据页的逻辑指针清单. 索引的作用: ...