HDU1164
来源:互联网 发布:阿斗 知乎 编辑:程序博客网 时间:2024/06/06 03:34
Eddy's research I
Problem Description
Eddy's interest is very extensive, recently he is interested in prime number. Eddy discover the all number owned can be divided into the multiply of prime number, but he can't write program, so Eddy has to ask intelligent you to help him, he asks you to write a program which can do the number to divided into the multiply of prime number factor .
Input
The input will contain a number 1 < x<= 65535 per line representing the number of elements of the set.
Output
You have to print a line in the output for each entry with the answer to the previous question.
Sample Input
119412
Sample Output
112*2*13*181
Author
eddy
// HDU1164 基础题// Eddy's research I http://acm.hdu.edu.cn/showproblem.php?pid=1164// 2017.08.28 by wyj#include#include #include using namespace std;int main() {int i, n;while (scanf("%d", &n) != EOF) {for (i = 2;i <= (int)sqrt((double)n);i++) {int k = n%i;if (k == 0) {printf("%d*", i);n = n / i;i = 1;}}printf("%d", n);printf("\n");}return 0;}
阅读全文
0 0
- HDU1164
- HDU1164
- hdu1164
- hdu1164
- hdu1164
- hdu1164
- HDU1164
- HDU1164
- HDU1164质数
- 数论第一题HDU1164
- HDU1164质因数分解
- hdu1164(素数筛选)
- HDU1164:Eddy's research I
- hdu1164-Eddy's research I
- Eddy\'s research I(HDU1164)
- hdu1164 Eddy's research I
- hdu1164 Eddy's research I
- HDU1164 Eddy's research I
- This version of the rendering library is more recent than your version of ADT ..解决办法
- Linux安装MYSQL
- 交叉编译器
- 数据库连接池性能比对(hikari druid c3p0 dbcp jdbc)
- js基础-常用API总结
- HDU1164
- JDBC连接数据库封装
- 王者荣耀之「装饰者模式」
- Android 点击穿透
- java基础——面向对象1
- mybatis入门基础(六)----高级映射(一对一,一对多,多对多)
- 自定义简单AlterDialog
- [Python学习] 专题六.局部变量、全局变量global、导入模块变量
- 临时存储页面上的数据---HTML5 Web存储