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.
1 //http://acm.hdu.edu.cn/showproblem.php?pid=1492 2 #include<iostream> 3 #include<cstdio> 4 using namespace std; 5 int main() 6 { 7 _int64 i,n,c1,c2,c3,c4; 8 9 while(scanf("%I64d",&n),n) 10 { 11 for(c1=1,i=n;i%2==0&&i!=0;i/=2) 12 c1++; 13 for(c2=1,i=n;i%3==0&&i!=0;i/=3) 14 c2++; 15 for(c3=1,i=n;i%5==0&&i!=0;i/=5) 16 c3++; 17 for(c4=1,i=n;i%7==0&&i!=0;i/=7) 18 c4++; 19 printf("%I64d\n",c1*c2*c3*c4); 20 } 21 return 0; 22 }
View Code
HDUOJ---The number of divisors(约数) about Humble Numbers相关推荐
- HDU 1492 The number of divisors(约数) about Humble Numbers(数论,简单约数)
The number of divisors(约数) about Humble Numbers Time Limit: 2000/1000 MS (Java/Others) Memory Lim ...
- HDU 1492 The number of divisors(约数) about Humble Numbers
The number of divisors(约数) about Humble Numbers Time Limit: 2000/1000 MS (Java/Others) Memory Limit: ...
- 杭电1492 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 Lim ...
- 图论 + 数论 ---- CF1325E E. Ehab‘s REAL Number Theory Problem (约数个数 + 枚举 + bfs找最小环)[从图结构优化搜索]
题目链接 题目大意: 给你nnn个数,每个数保证约数个数不超过777个.问你从中选出若 干个数的乘积是完全平方数,最少要选择多少个数?,不存在输出-1. 题目思路: 1.每个数约数不超过7个→\rig ...
- poj 2247 Humble Numbers
Humble Numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9453 Accepted: 4440 题目 ...
- HDU1058 Humble Numbers
题目:Humble Numbers humble number从1为"始祖",剩下的所有数,其实都是在此基础上乘以2,3,5,7演化出来的,代码主要语句:f[t]=min(2*f[ ...
- NUC1077 Humble Numbers【数学计算+打表】
Humble Numbers 时间限制: 1000ms 内存限制: 65536KB 通过次数: 1总提交次数: 1 问题描述 A number whose only prime factors are ...
- NUC1077 Humble Numbers【数学计算+打表+水题】
Humble Numbers 时间限制: 1000ms 内存限制: 65536KB 通过次数: 1总提交次数: 1 问题描述 A number whose only prime factors are ...
最新文章
- Nature Method :Rob Knight发布Striped UniFrac算法轻松分析微生物组大数据
- 自律到极致-人生才精致:第6期
- linux安装显卡驱动的run文件,Linux系统下安装NVIDIA显卡驱动(run格式文件)
- Java 原生日志 java.util.logging
- [转载]HTTP PUSH技术原理,结合ASP.NET实现以及评述
- 关于HTML的面试题-html4/css2篇
- 2018程序员最佳ssh免费登陆工具
- vi交互式批量替换 vi批量替换 vi查找和替换
- HTML里img标签里的alt属性解释
- iphone5s已停用连接itunes怎么办?苹果5s已停用连接itunes解决方法
- day14_html和css
- DolphinScheduler征稿 —手把手教你如何使用小豚调度
- 奇迹Mu分析 - NPC相关操作
- win10升级后蓝牙不见了,设备管理器里没有,多了个串行控制器里的未知USB设备?...
- python常用基础库:标准库和第三方库
- 西北乱跑娃 --- opencv泛洪填充学习笔记
- 小熊派开发板移植RT-FOTA
- 都是学 AI,为什么别人薪资比你高?
- android屏幕解锁图案,安卓手机图案屏幕锁解锁方法!!
- 淘宝店铺订单自动发货解决方案
热门文章
- 广东 职称英语计算机,现在评职称英语和计算机都不用考了
- string转short java_[Java基础]之 数据类型转换
- java redis 商品秒杀_使用redis秒杀出现产品超发现象求解?
- java为什么需要枚举_java – 什么是枚举,为什么它们有用?
- 计算机WIN7动态硬盘分区,win7硬盘分区教程
- 美好生活水果新食尚消费趋势报告
- 互联网日报 | 8月4日 星期三 | 京东货运航空筹建获批;小米手机出货量在欧洲首次登顶;阿里全球年度活跃消费者11.8亿...
- 中国共享经济发展报告
- 基本类型赋值和普通对象赋值的不同
- 【2017年第3期】面向共享的政府大数据质量标准化问题研究