Eddy's research I

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 7389    Accepted Submission(s):
4472

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
11
9412
 
Sample Output
11
2*2*13*181
 #include <stdio.h>
int main()
{
int s[],n,i;
while(scanf("%d",&n))
{
int k=;
for(i=;i<=n;i++)
{
while(n%i==)
{
s[k++]=i;
n=n/i;
}
}
for(i=;i<k;i++)
{
if(i==k-)
printf("%d",s[i]);
else
printf("%d*",s[i]);
}
printf("\n");
}
}
 

Eddy's research I的更多相关文章

  1. HDU 1165 Eddy's research II(给出递归公式,然后找规律)

    - Eddy's research II Time Limit:2000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64 ...

  2. hdu 1164:Eddy's research I(水题,数学题,筛法)

    Eddy's research I Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others ...

  3. HDOJ 1164 Eddy's research I(拆分成素数因子)

    Problem Description Eddy's interest is very extensive, recently he is interested in prime number. Ed ...

  4. HDOJ 1164 Eddy's research I

    Problem Description Eddy's interest is very extensive, recently he is interested in prime number. Ed ...

  5. HDU 1165 Eddy's research II (找规律)

    题意:给定一个表达式,然后让你求表达式的值. 析:多写几个就会发现规律. 代码如下: #pragma comment(linker, "/STACK:1024000000,102400000 ...

  6. HDU 1165 Eddy's research II

    题意:已知,求A(m, n). 分析:根据样例模拟一下过程就可以找出递推关系. #include<cstdio> #include<cstring> #include<c ...

  7. HDU 1164 Eddy's research I

    题目链接 题意 : 给你一个数,让你用它的素数质因子表示出来. 思路 : 先打一下表,因为会有重复的质因子,所以从大到小开始找,并且找到一个之后不能就接着往下找,要再找一遍这个数. #include ...

  8. 动态规划入门——Eddy's research II

    转载请注明出处:http://blog.csdn.net/a1dark 分析:找规律 #include<stdio.h> int main(){ int m,n; while(scanf( ...

  9. hdu 1164 Eddy's research I

    http://acm.hdu.edu.cn/showproblem.php?pid=1164 题意很简单,只是写代码的时候需要注意几个问题 一.筛选素数的时候记得用埃式筛选法,要是直接找可能会WA. ...

随机推荐

  1. 利用radio实现纯css选项卡切换

    aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtIAAABCCAIAAAD18aaXAAAG70lEQVR4nO3dO5KrPBCGYRY0VV4OEX

  2. List是线程安全的吗?如果不是该怎么办呢?安全的List对性能的影响有多大呢?

    测试条件: 开启2个并行执行任务,往同一个list对象写入值 测试代码: ; static List<int> list = new List<int>(); static v ...

  3. C# XML序列化帮助类代码

    public static class XmlHelper { private static void XmlSerializeInternal(Stream stream, object o, En ...

  4. setPixel抛出java.lang.IllegalStateException

    原来,从ImageView里读取的Bitmap,或者加载drawable里的图片资源,返回的都是一个immutalbe的bitmap,所以不能用setpixels 必须采取类似Bitmap bmp = ...

  5. Window运行命令大全

    1. gpedit.msc-----组策略    2. sndrec32-------录音机   3. Nslookup-------IP地址侦测器   4. explorer-------打开资源管 ...

  6. mysql select不使用任何锁(select with nolock)

    在ms sql中可以通过with(nolock)选项指定查询不锁表,在mysql中没有这个选项,需要通过set语句来设置不锁表: SET TRANSACTION ISOLATION LEVEL REA ...

  7. 开源欣赏wordpress之文章新增页面如何实现。

    本地网址http://localhost/wordpress/wp-admin/post-new.php 进而找到post-new.php页面. 进入之后, require_once( dirname ...

  8. POJ 2263 Heavy Cargo(Floyd + map)

    Heavy Cargo Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 3768   Accepted: 2013 Descr ...

  9. UVA 100 - The 3n+1 problem (3n+1 问题)

    100 - The 3n+1 problem (3n+1 问题) /* * 100 - The 3n+1 problem (3n+1 问题) * 作者 仪冰 * QQ 974817955 * * [问 ...

  10. python中的那些“神器”

    "武林至尊,宝刀屠龙,号令天下,莫敢不从,倚天不出,谁与争锋",这是神器.不过今天要说的python中的"神器"就没有这么厉害了,这里要说的"神器&q ...