码迷,mamicode.com
首页 >  
搜索关键字:calculate prime s    ( 3428个结果
Max Sum(最大子序和)
DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the ma...
分类:其他好文   时间:2015-06-04 19:02:01    阅读次数:96
Project Euler:Problem 37 Truncatable primes
The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage: 3797, 797, 97, and 7. Similarly we c...
分类:其他好文   时间:2015-06-04 11:56:43    阅读次数:84
opensips使用加密密码认证
使用明文密码登录modparam("auth_db","calculate_ha1",yes) modparam("auth_db","password_column","password")使用密码登录modparam("auth_db","calculate_ha1",0) modparam("auth_db","password_column","ha1")在opensipsctrl以上必须要确保去除下面的注释STORE_PLAINTEXT=0
分类:其他好文   时间:2015-06-03 19:48:13    阅读次数:284
C++刷题——2707: 素数与因子
Description 从键盘输入任意整数n,若n不是素数,则计算出n的所有因子(不包括1),例如对于16,输出2,4,8;否则输出“It is a prime number.” 判断素数和求因子分别用函数完成。 Input 任意整数n Output 该数的因子或素数标志。 Sample Input 16 Sample Output 2 4 8 /* Copyrigh...
分类:编程语言   时间:2015-06-03 09:50:02    阅读次数:136
B - Alexandra and Prime Numbers
Alexandra has a little brother. He is new to programming. One day he is solving the following problem: Given an positive integer N, judge whether N is...
分类:其他好文   时间:2015-06-03 09:35:30    阅读次数:130
1154
1 #include 2 #include 3 #include 4 using namespace std; 5 int main() 6 { 7 int i,n=0,m,a; 8 bool prime; 9 cin>>a;10 for(m=101;m<=2...
分类:其他好文   时间:2015-06-02 21:52:22    阅读次数:111
1029
1 #include 2 using namespace std; 3 int main() 4 { 5 int sushu(int x); 6 int a; 7 cin>>a; 8 if(sushu(a)==1) 9 cout<<"prime"<...
分类:其他好文   时间:2015-06-02 21:36:36    阅读次数:79
sicily 1259 Sum of Consecutive Primes
又水,素数只能是连续的,而且最多才10000! 1 #include 2 3 using namespace std; 4 5 int a[10001]; 6 7 bool is_prime(int x) 8 { 9 if(x == 1) return 0;10 for...
分类:其他好文   时间:2015-06-02 21:25:09    阅读次数:122
HDU 2141 Can you find it?(二分)
题目链接:clicl here~~ 【题目大意】: Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy the formula ...
分类:其他好文   时间:2015-06-02 20:16:22    阅读次数:84
A+B 吐槽
A+B Description Calculate a + b Input The input will consist of a series of pairs of integers a and b,separated by a space, one pair of integers per line. Output For each pair of input integers a ...
分类:其他好文   时间:2015-06-02 09:24:12    阅读次数:99
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!