# 素数筛 #
-
Sum of Consecutive Prime Numbers(POJ2739)
题意 给定一个1~n之间的数,问由连续素数凑成该数的的方案有几种,比如:53 = 53, 53 = 5 + 7 + 11 + 13 + 17,那么方案数就是2. 分析 注意这里暴力的枚举方法。 AC代码 #incl...
-
Semi-prime H-numbers
题目 This problem is based on an exercise of David Hilbert, who pedagogically suggested that one study the theory of 4n+1...
-
X-factor Chains
题目 Given a positive integer X, an X-factor chain of length m is a sequence of integers, 1 = X0, X1, X2, …, Xm = X...
-
Prime Number
题目 Write a program which reads an integer n and prints the number of prime numbers which are less than or equal to n. A...