HDU--1164
来源:互联网 发布:海鹰数据网 编辑:程序博客网 时间:2024/06/01 10:48
Eddy's research I
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7402 Accepted Submission(s): 4479
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
#include <iostream>using namespace std;int main(){int n;while (cin >> n){for (int i=2; i<=n; i++){if (n %i==0){n = n/i;if (n==1)cout << i<< endl;elsecout << i<< "*";i= 1;}}}return 0;}
0 0
- HDU:1164
- hdu 1164
- HDU 1164
- hdu(1164)
- HDU 1164
- hdu 1164
- hdu 1164
- HDU--1164
- HDU-1164
- hdu 1164
- HDU 1164
- HDU-1164(质因数分解)
- HDU 1164 素数
- hdu 1164 素数
- HDU 1164 JAVA
- hdu
- hdu
- HDU
- Invert Binary Tree
- 并发编程实践五:ReentrantLock
- Hadoop安装
- Python模块学习笔记— —hashlib
- Python学习十二:高阶函数
- HDU--1164
- 日期格式化
- 初次接触Deep Learning 任务1的解读
- Fabric批量远程执行操作
- 网络的两大模型
- 因特网的IP协议是不可靠无连接的,那为什么当初不直接把它设计为可靠的?
- Leetcode[144]-Binary Tree Preorder Traversal
- Java IO流中的flush()的神秘面纱
- 反向代理实现nginx+apache动静分离