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 ...
随机推荐
- nginx日志管理与限速
1.日志简介nginx日志主要有两种:访问日志和错误日志.访问日志主要记录客户端访问nginx的每一个请求,格式可以自定义:错误日志主要记录客户端访问nginx出错时的日志,格式不支持自定义.两种日志 ...
- Django 反向生成 从数据库生成Model
Django 反向生成 从数据库生成Model 使用Django生成Model python manage.py inspectdb或python manage.py inspectdb > m ...
- WINAPI大全~
http://www.alsprogrammingresource.com/win32_functions_g.html
- SHELL种类,版本及选择
SHELL种类,版本及选择 凡是使用 *INX 的人,不论是作为 login shell 还是编程,多少都要接触到 Shell.经过多年的发展, Shell 的种类繁多.除了我们熟悉的 sh.ksh. ...
- CString 的一些事
MFC Visual Studio 2008 CString 的 Format 中不能这样存在str.Format(_T("Cool(\%)")); 或者 str.Format( ...
- spftlayer 安装及简单使用
1,yum -y install python-pip; pip(Python packet index);
- C#中,表达式的计算遵循一个规律:从左到右依次计算。
int i = 0; int j = (i++)+(i++)=(i++)+i=i+++i=i+++i++=1;
- 《招聘一个靠谱的iOS》面试题参考答案(上)
说明:面试题来源是微博@我就叫Sunny怎么了的这篇博文:<招聘一个靠谱的 iOS>,其中共55题,除第一题为纠错题外,其他54道均为简答题. 博文中给出了高质量的面试题,但是未给出答案, ...
- UIView 转 UIImage
这个方法很实用,特别是在做水印相机得时候... - (UIImage*) imageWithUIView:(UIView*) view{ // 创建一个bitmap的context // 并把它设置成 ...
- Cookie知识点小结
问题是什么?有哪些技术?如何解决? 1. Cookie 1)完成回话跟踪的一种机制:采用的是在客户端保存Http状态信息的方案 2)Cookie是在浏览器访问WEB服务器的某个资源时,由WEB服务器在 ...