Prime Independence
Time Limit:3000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu
Submit Status Practice LightOJ
1356
Description
A set of integers is called prime independ...
分类:
其他好文 时间:
2015-06-02 00:28:05
阅读次数:
121
题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1042N!DescriptionGiven an integer N(0 ≤ N ≤ 10000), your task is to calculate N!InputOne N in one line, ...
分类:
其他好文 时间:
2015-05-31 15:20:25
阅读次数:
114
/*ID: awsd1231PROG: pprimeLANG: C++*/#include#includeusing namespace std;int mayAns[] = {5, 7, 11, 101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 7...
分类:
其他好文 时间:
2015-05-31 15:13:35
阅读次数:
200
1、eclipse创建Java project,并建立相应的包、类(calculate.java)2、在package explorer中右键new Junit Test Case,关联相应的工程3、选择Junit4则会自动引入相应的包4、编写calculate类中的加减乘除函数package co...
分类:
其他好文 时间:
2015-05-31 12:06:40
阅读次数:
137
DescriptionDoctor Ghee is teaching Kia how to calculate the sum of two integers. But Kia is so careless and alway forget to carry a number when the su...
分类:
编程语言 时间:
2015-05-30 22:36:37
阅读次数:
204
我们先来看一下最经典的埃拉特斯特尼筛法。时间复杂度为O(n loglog n)
int ans[MAXN];
void Prime(int n)
{
int cnt=0;
memset(prime,1,sizeof(prime));
prime[0]=prime[1]=0;
for(int i=2;i<n;i++)
{
if(vis[i])
{
ans[cnt++]=...
分类:
其他好文 时间:
2015-05-30 09:24:54
阅读次数:
277
Problem DescriptionA number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15,...
分类:
其他好文 时间:
2015-05-29 20:14:10
阅读次数:
99
Semi-prime H-numbers
Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u
Submit Status Practice POJ
3292
Appoint description:
lijunle (2011-08-04)System Crawler (...
分类:
其他好文 时间:
2015-05-29 14:06:36
阅读次数:
202
dfs 确定每一个位置上填写的数字#include
#include
#include
#include
#include
using namespace std;int n;
int A[18];
int p[40];
int vis[18];int is_prime(int n){
for(...
分类:
其他好文 时间:
2015-05-28 23:19:52
阅读次数:
344
Description
Two positive integers are said to be relatively prime to each other if the Great Common Divisor (GCD) is 1. For instance, 1, 3, 5, 7, 9…are all relatively prime to 2006.Now your job is eas...
分类:
移动开发 时间:
2015-05-28 21:37:06
阅读次数:
143