Eddy's research I
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
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 .
line representing the number of elements of the set.
with the answer to the previous question.
#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的更多相关文章
- HDU 1165 Eddy's research II(给出递归公式,然后找规律)
- Eddy's research II Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64 ...
- hdu 1164:Eddy's research I(水题,数学题,筛法)
Eddy's research I Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others ...
- HDOJ 1164 Eddy's research I(拆分成素数因子)
Problem Description Eddy's interest is very extensive, recently he is interested in prime number. Ed ...
- HDOJ 1164 Eddy's research I
Problem Description Eddy's interest is very extensive, recently he is interested in prime number. Ed ...
- HDU 1165 Eddy's research II (找规律)
题意:给定一个表达式,然后让你求表达式的值. 析:多写几个就会发现规律. 代码如下: #pragma comment(linker, "/STACK:1024000000,102400000 ...
- HDU 1165 Eddy's research II
题意:已知,求A(m, n). 分析:根据样例模拟一下过程就可以找出递推关系. #include<cstdio> #include<cstring> #include<c ...
- HDU 1164 Eddy's research I
题目链接 题意 : 给你一个数,让你用它的素数质因子表示出来. 思路 : 先打一下表,因为会有重复的质因子,所以从大到小开始找,并且找到一个之后不能就接着往下找,要再找一遍这个数. #include ...
- 动态规划入门——Eddy's research II
转载请注明出处:http://blog.csdn.net/a1dark 分析:找规律 #include<stdio.h> int main(){ int m,n; while(scanf( ...
- hdu 1164 Eddy's research I
http://acm.hdu.edu.cn/showproblem.php?pid=1164 题意很简单,只是写代码的时候需要注意几个问题 一.筛选素数的时候记得用埃式筛选法,要是直接找可能会WA. ...
随机推荐
- 如何系统地学习JavaScript
在过去,JavaScript只是被用来做一些简单的网页效果,比如表单验证.浮动广告等,所以那时候JavaScript并没有受到重视.自从AJAX开始流行后,人们发现利用JavaScript可以给用户带 ...
- Measuring Lengths in Baden
Description Measuring Lengths in Baden time limit per test: 2 seconds memory limit per test: 256 meg ...
- bzoj2100 [Usaco2010 Dec]Apple Delivery
Description Bessie has two crisp red apples to deliver to two of her friends in the herd. Of course, ...
- HTML5 Canvas Cheat Sheet
HTML5 Canvas Cheat Sheet HTML5 Canvas Cheat Sheet v1.x
- Struts2(一)——总体介绍
这篇博客开始将总结一下有关框架的知识,在开发中合适的利用框架会使我们的开发效率大大提高.当今比较流行的开源框架: 关注数据流程的MVC框架 (Struts1/2, WebWork, Spring MV ...
- 逐渐深入地理解Ajax
Ajax的基本原理是:XMLHttpRequest对象(简称XHR对象),XHR为向服务器发送请求和解析服务器响应提供了流畅的接口.能够以异步方式从服务器获得更多信息.意味着用户不必刷新页面也能取得新 ...
- [置顶] ID3算法的python实现
这篇文章的内容接着http://blog.csdn.net/xueyunf/article/details/9214727的内容,所有还有部分函数在http://blog.csdn.net/xueyu ...
- Clash of Clans(COC)资源压缩解密
Clash of Clans,简称为COC,中文名<部落冲突>,是ios平台上一款相当火爆的战斗策略类游戏,开发商是芬兰的supercell,据说日收入上百万美刀,创造了手游史上的一个神话 ...
- Android应用程序组件Content Provider应用实例
文章转载至CSDN社区罗升阳的安卓之旅,原文地址:http://blog.csdn.net/luoshengyang/article/details/6950440 文简要介绍了Android应用程序 ...
- sql server去除重复信息,
SELECT st_id FROM ( SELECT *,ROW_NUMBER() OVER( PARTITION BY st_code ORDER BY st_code ) AS num FROM ...