码迷,mamicode.com
首页 >  
搜索关键字:calculate prime s    ( 3428个结果
hdu 1012 u Calculate e
u Calculate e Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 31968    Accepted Submission(s): 14314 Problem Description A simple m...
分类:其他好文   时间:2014-12-02 13:34:06    阅读次数:131
An Easy Problem
描述     In this problem, you are given two integers L and R, and your task is to calculate the sum of all the number's square between L and R(inclusive). 输入The first line contains an integer ...
分类:其他好文   时间:2014-12-02 11:55:51    阅读次数:181
Ugly Numbers(POJ1338)(丑数,技巧性强)
Ugly Numbers Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 20851   Accepted: 9248 Description Ugly numbers are numbers whose only prime factors are 2, 3 or...
分类:其他好文   时间:2014-12-01 01:12:44    阅读次数:196
2的29次方范围内的素数
今天隔壁室友让我帮他写一个晒素数的程序 我就写了一个  发现再int范围内的素数筛不出来,,,, 电脑只能跑到 2的29; #include #include #include #include #include #include using namespace std; typedef long long ll; bool is_prime[1<<30]; int prime...
分类:其他好文   时间:2014-11-30 23:19:58    阅读次数:215
sicily 1500. Prime Gap
DescriptionThe sequence of n ? 1 consecutive composite numbers (positive integers that are not prime and not equal to 1) lying between two successive ...
分类:其他好文   时间:2014-11-30 14:00:35    阅读次数:192
一道动态规划的题目
题目描述: Create a class called Football. In football, scores are incremented by either 2, 3, or 7 points. Given a numerical input (integer between 1 and 75) representing a final score, calculate the n...
分类:其他好文   时间:2014-11-28 18:21:33    阅读次数:276
python-快速入门
ref: Calculate Field examplesEntering values with the keyboard is not the only way you can edit values in a table. In some cases, you might want to pe...
分类:编程语言   时间:2014-11-28 18:03:40    阅读次数:335
hdu 5072 计数+容斥原理
/*题意: 给出n个数(n#include #include using namespace std;typedef __int64 LL;const int maxn=1000;int prime[maxn],flag[maxn],num;int numc[maxn*100+5],f[maxn*1...
分类:其他好文   时间:2014-11-28 06:16:09    阅读次数:167
Prime Ring Problem(杭电1016)(DFS)
Prime Ring Problem Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 28204    Accepted Submission(s): 12561 Problem Description A rin...
分类:其他好文   时间:2014-11-27 20:33:38    阅读次数:238
因子和阶乘
题意太多我就不写了来说思路吧:刚看完这道题我有点蒙 不知道从何入手 后来看了大牛的博客才写出来这些,首先我们得先求出所有素数,然后用每个素数除就可以了,然后用p[i]来存个数下面看代码吧:#include#includeint is_prime(int n){ for(int i = 2;i*...
分类:其他好文   时间:2014-11-27 15:53:37    阅读次数:130
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!