码迷,mamicode.com
首页 >  
搜索关键字:bear and prime numbe    ( 2904个结果
POJ 2739 Sum of Consecutive Prime Numbers( *【素数存表】+暴力枚举 )
Sum of Consecutive Prime NumbersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 19895Accepted: 10906DescriptionSome positive integers can be ...
分类:其他好文   时间:2015-01-22 17:16:21    阅读次数:177
poj 3292 Semi-prime H-numbers 筛数打表
题意: 给定n,求1至n中有多少个数能仅表示成两个(4*x+1,x>=1)的数之积。 分析: 打表,一开始的list[i*j]代表i*j的组成方式数,不需要用乘法,加法就好。 代码: //poj 3292 //sep9 #include using namespace std; int list[1200000]; int main() { memset(list,0,sizeof...
分类:其他好文   时间:2015-01-22 15:37:29    阅读次数:160
cf B Bear and Strings
题意:给你一个字符串,然后找多少区间内含有“bear”,输出数目; 1 #include 2 #include 3 #include 4 using namespace std; 5 6 char str[5001]; 7 int pos[50001]; 8 9 int main()10 ...
分类:其他好文   时间:2015-01-22 10:41:37    阅读次数:102
【每日积累】-oracle之connect by 002
1. hierarchical query语义分析:2. hierarchical query脚本测试:---删除已存在表drop table test;-- Create tablecreate table TEST( orgno NUMBER(10) not null, deptno NUMBE...
分类:数据库   时间:2015-01-22 01:40:02    阅读次数:160
POJ 3126 Prime Path(BFS)
Prime Path Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 12060   Accepted: 6843 Description The ministers of the cabinet were quite upset by the message ...
分类:其他好文   时间:2015-01-21 22:33:32    阅读次数:176
JS字符串转换成数字
方法主要有三种转换函数、强制类型转换、利用js变量弱类型转换。1. 转换函数:js提供了parseInt()和parseFloat()两个转换函数。前者把值转换成整数,后者把值转换成浮点数。只有对String类型调用这些方法,这两个函数才能正确运行;对其他类型返回的都是NaN(Not a Numbe...
分类:Web程序   时间:2015-01-21 21:58:29    阅读次数:138
求2000000一下的素数和----Python
import mathdef prime(n): t=int(math.sqrt(n)+1) if i==2: return 1 for i in range(2,t+1): if n%i==0: return 0 return 1result=0for i in range(2,2000000):...
分类:编程语言   时间:2015-01-21 21:48:43    阅读次数:293
LA 3998 Prime k-tuple
题意:如果K个相邻素数p1,p2,p3.....pk满足pk-p1=s,称这些素数组成一个距离为s的素数K元组,输入a,b,k,s,输出区间[a,b]内距离为s的素数k元组的个数。思路:先打到50000素数表,然后暴力求出a,b区间的素数,然后判断。 1 #include 2 #include .....
分类:其他好文   时间:2015-01-21 16:29:15    阅读次数:105
HTML特殊符号对应代码
HTML特殊符号对应代码:1234符号HTML符号HTML&&>?⁄""¸¸°°½½¼¼¾¾««»»¯¯‰‰?•……″&Prime...
分类:Web程序   时间:2015-01-20 10:14:56    阅读次数:370
hdu 5104 Primes Problem (素数 打表 水)
http://acm.hdu.edu.cn/showproblem.php?pid=5104#include#include#include#include#includeusing namespace std;int isp[10000+100];int prime[10000];int coun...
分类:其他好文   时间:2015-01-18 15:42:54    阅读次数:161
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!