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 ...
随机推荐
- 实现在线阅读pdf功能--php
在网上找了很久,想要实现一个在线阅读word,pdf文件的功能,网上的资料很多,但是提到真正怎么实现的比较少.现在我来简单说明一下,我实现的过程. 我现在只能实现在线阅读pdf(将word等转换成pd ...
- Linux怎样修改系统时间
修改linux的时间可以使用date指令 修改日期: 时间设定成2009年5月10日的命令如下: #date -s 05/10/2009 修改时间: 将系统时间设定成上午10点18分0秒的命令如下. ...
- 查询反模式 - 正视NULL值
一.提出问题 不可避免地,我们都数据库总有一些字段是没有值的.不管是插入一个不完整的行,还是有些列可以合法地拥有一些无效值.SQL 支持一个特殊的空值,就是NULL. 在很多时候,NULL值导致我们的 ...
- 在win7与XP系统下 C#缺省路径不同
当我们加载文件时,若只输入文件名,在WIN7下默认是主程序所在文件夹路径 在XP下是上次本程序游览的有效路径 所以以后程序中尽量避免只传文件名
- 避免ssh断开导致运行命令的终止:screen
事情是这样的,需要使用ssh登陆服务器,进行工程的编译,结果不知道什么原因ssh出现write failed:broken pipe,掉线了.反复实验了好几次还是这样(白花花的时间啊,又是config ...
- NLog 2.0.0.2000 使用实例
原文地址:http://www.cnblogs.com/sorex/archive/2013/01/31/2887174.html ---------------------------------- ...
- jdbc连接数据库工具类
import java.lang.reflect.Field; import java.sql.Connection; import java.sql.DriverManager; import ja ...
- hdu 5430 Reflect (数学推导题)
Problem Description We send a light from one point on a mirror material circle,it reflects N times a ...
- Apache POI组件操作Excel,制作报表(一)
Apache的POI组件是Java操作Microsoft Office办公套件的强大API,其中对Word,Excel和PowperPoint都有支持,当然使用较多的还是Excel,因为Word和Po ...
- AC Milan VS Juventus(模拟)
AC Milan VS Juventus Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Oth ...