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: 32768/32768 K (Java/Others)Total Submission(s): 1741 Accepted Submission(s): 852
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.
排列组合求约数个数 #include <iostream> #include <map> #include <stdio.h> #include <math.h> #include <string.h> #include <stdlib.h> #include <algorithm> using namespace std; int main() {__int64 n;__int64 rc[4];int p[4]={2,3,5,7};while(scanf("%I64d",&n),n){for(int i=0;i<4;i++){rc[i]=1;if(n%p[i]==0)while(n%p[i]==0) {n/=p[i];rc[i]++;}}printf("%I64d\n",rc[0]*rc[1]*rc[2]*rc[3]);}return 0; }
转载于:https://www.cnblogs.com/372465774y/archive/2012/10/20/2732386.html
HDU 1492 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 ...
- 杭电1492 The number of divisors(约数) about Humble Numbers
The number of divisors(约数) about Humble Numbers Time Limit: 2000/1000 MS (Java/Others) Memory Lim ...
- HDUOJ---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 ...
- HDU 3826 Squarefree number:题目解答源码
2019独角兽企业重金招聘Python工程师标准>>> HDU 3826 Squarefree number:题目解答源码 In mathematics,a squarefree n ...
- 【HDU】1005 Number Sequence (有点可爱)
http://acm.hdu.edu.cn/showproblem.php?pid=1005 A number sequence is defined as follows: f(1) = 1, f( ...
- HDU 5972 Regular Number
Regular Number http://acm.hdu.edu.cn/showproblem.php?pid=5972 题意: 给定一个字符串,求多少子串满足,子串的第i位,只能是给定的数(小于等 ...
- HDU 5898 odd-even number
题目:odd-even number 链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=5898 题意:给一个条件,问l 到r 之间有多少满足条件的 ...
最新文章
- 程序员加班崩溃,过路外卖小哥主动帮忙改代码,网友直呼太暖了!
- 用Beamer制作幻灯片(卷三 动画篇)
- 系列TCP/IP协议-广播与多播(010)
- 补第一阶段冲刺站立会议3(应发表日期5月15日)
- 东师计算机应用基础18秋在线作业3答案,奥鹏东师计算机应用基础15秋在线作业3试卷及答案(4)...
- 瞎说系列之Object.assign入门
- OCM备考 三. Managing Database Availability 之RMAN高级操作
- (转帖)开源容器集群管理系统Kubernetes架构及组件介绍
- js读写php文件,在js中如何读取本地文件
- 注解@RequestParam【不添加默认项注解】与@RequestBody的使用场景
- Java例15.13——使用MVC结构计算三角形面积
- Postman代理设置
- 学习笔记-Wood‘s anomalies
- Teams通话质量仪表盘进阶使用
- SOLID原则 【转】
- 同步通信和异步通信的爱恨情仇
- 原理 + 代码 | Python 实现多元线性回归模型 (建模 + 优化,附源数据)
- Python3爬取企查查网站的企业年表并存入MySQL
- 对比:空洞卷积与转置卷积(吉米王)
- 逻辑推理题:谁是凶手
热门文章
- 进程控制常用的一些操作
- WordPress插件开发-创建、停用、删除插件
- 学习笔记(11月08日)--异常
- 在OOW2009上寻宝撞大运续(床上篇)
- 程序员,软件测试知多少?
- SpringMVC(一):环境搭建
- 转:[C/C++]2014年7月华为校招机试真题(一)
- Android应用开发—Android 消息处理机制:HandlerMessage
- matlab采样频谱,Matlab对采样数据进行频谱分析
- flask-SQLAlchemy 使用 session.commit() 处理异常回滚