码迷,mamicode.com
首页 >  
搜索关键字:calculate prime s    ( 3428个结果
hdu 1042 N!(高精度乘法)
Problem DescriptionGiven an integer N(0 ≤ N ≤ 10000), your task is to calculate N!InputOne N in one line, process to the end of file.OutputFor each N,...
分类:其他好文   时间:2015-02-07 11:43:17    阅读次数:128
HDU 1001 Sum Problem C/C++
Problem DescriptionHey, welcome to HDOJ(Hangzhou Dianzi University Online Judge).In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... +...
分类:编程语言   时间:2015-02-06 20:27:57    阅读次数:167
POJ 2318 TOYS 叉积应用
点击打开链接 TOYS Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 11078   Accepted: 5312 Description Calculate the number of toys that land in eac...
分类:其他好文   时间:2015-02-06 18:57:52    阅读次数:175
UVa 136 - Ugly Numbers
Ugly NumbersUgly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ...shows the first 11 ugl...
分类:其他好文   时间:2015-02-06 12:48:40    阅读次数:217
YT14-HDU-取余
Problem Description As we know, Big Number is always troublesome. But it's really important in our ACM. And today, your task is to write a program to calculate A mod B. To make the problem easie...
分类:其他好文   时间:2015-02-06 09:34:56    阅读次数:132
SGU[113] Nearly prime numbers
Description描述Nearly prime number is an integer positive number for which it is possible to find such primesP1andP2that given number is equal toP1*P2. ...
分类:其他好文   时间:2015-02-05 14:53:15    阅读次数:171
hdu 1164 Eddy's research I
1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 #define MAX 65535 9 int prime[MAX+5];10 bool vis[MAX+5];11....
分类:其他好文   时间:2015-02-03 22:45:59    阅读次数:197
【BZOJ】【2818】Gcd
欧拉函数/莫比乌斯函数 嗯……跟2910很像的一道题,在上道题的基础上我们很容易就想到先求出gcd(x,y)==1的组,然后再让x*=prime[i],y*=prime[i]这样它们的最大公约数就是prime[i]了…… 当然我们完全没必要这样做……对于每个prime[j],计算在(1,n/pr.....
分类:其他好文   时间:2015-02-03 19:12:36    阅读次数:215
Zoj 3707 calculate prime s
题意:S[n]与所有S[i](i互质,则为Prime S。求(S[n]/X)%M; 思路:由集合性质推得S[i+1]=S[i]+S[i-1],则S[i]是斐波那契数。从第五项开始,每项斐波那契为质数的条件为当且仅当它的项数为质数,因此采用素数打表的方法得到第k个Prime S的斐波那契数的项数。然后用矩阵乘法求出第k个S的值对应的下一个斐波那契数,然后枚举该斐波那契数,直到能被X整除。 #in...
分类:其他好文   时间:2015-02-03 13:20:17    阅读次数:150
Lintcode: A+B problem
For given numbers a and b in function aplusb, return the sum of them.NoteYou don't need to parse the input and output. Just calculate and return.Examp...
分类:其他好文   时间:2015-02-03 06:59:57    阅读次数:122
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!