码迷,mamicode.com
首页 >  
搜索关键字:calculate prime s    ( 3428个结果
Lintcode: Fast Power 解题报告
Fast Power 原题链接:http://lintcode.com/en/problem/fast-power/#Calculate the an% b where a, b and n are all 32bit integers.ExampleFor 231 % 3 = 2For 10010...
分类:其他好文   时间:2014-12-19 23:22:09    阅读次数:241
【c语言】统计一个整数所包含的素因子并输出
#include#includeint prime(int n){ int i; if(n=sqrt(n)){ printf("素数:%d\n",n); return 1; } }void main(){ int i,n,count=0; while(1){ printf("请输入一个整数:"...
分类:编程语言   时间:2014-12-19 21:52:58    阅读次数:253
素数筛法--SPOJ Problem 2 Prime Generator
质数(prime number)又称素数,除了1和它本身外,不能整除以其他自然数,换句话说就是该数除了1和它本身以外不再有其他的因数;否则称为合数。最小的质数是2。要判断一个整数N是不是质数很简单,看它是否能被2到sqrt(N)之间的整数整除即可。def isPrime(n): if n%2=...
分类:其他好文   时间:2014-12-19 20:31:07    阅读次数:129
【c语言】判断一个数是不是素数?
#include#includeint prime(int n){ int i; if(n=sqrt(n)){ printf("%d是素数!\n",n); return 0; }}void main(){ int n; while(1){ printf("请输入一个数字:"); scanf("...
分类:编程语言   时间:2014-12-18 22:01:16    阅读次数:227
*Exercise 5.1 Summing reciprocals of five values
Exercise 5-1. Write a program that will read five values of type double from the keyboardand store them in an array. Calculate the reciprocal of each ...
分类:其他好文   时间:2014-12-18 20:26:11    阅读次数:518
Prime Path (swust oj 0002)
先占个坑。。。 Description:http://acm.swust.edu.cn/problem/0002/
分类:其他好文   时间:2014-12-18 15:05:46    阅读次数:90
Exercise 3.3 Calculate a discounted price
Exercise 3-3. Write a program that will calculate the price for a quantity entered from the keyboard, given that the unit price is $5 and there is a d...
分类:其他好文   时间:2014-12-17 23:53:57    阅读次数:174
IC设计中的功耗分析的流程
首先声明本文所讲的范围,在这篇文章中,是采用synopsys的设计流程,对数字电路进行功耗分析,生成功耗分析报告的流程。分析的对象是逻辑综合之后布局布线之前的功耗分析,以及布局布线之后的功耗分析。 Synopsys做功耗分析使用到的工具是:Primetime PX, Prime Rail。PTPX可...
分类:其他好文   时间:2014-12-16 18:30:23    阅读次数:428
题目1459:Prime ring problem
题目描述:A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two ad...
分类:其他好文   时间:2014-12-16 17:00:52    阅读次数:207
校园导游图的课程设计(三)
两天和作一天吧只要是作 prime 算法的实现,作用是找一个图的最小生成树,用的是列表void Prim( ListMatrix *G, int start )/* * 寻找一某一点为核心的最佳布线 * 即使用prime最小生成树 */ { struct{ ...
分类:其他好文   时间:2014-12-12 22:02:40    阅读次数:197
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!