- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 110801 Little Bishops
// Refer to http://blog.csdn.net/metaphysis/article/details/6553011 to see the design of following program.import java.util.*;public class Main { private static void ClearArray(long[][] data, int
2013-12-18 15:39:30 767
原创 110707 Marbles
import java.util.*;public class Main { private static long GetGCD(long a, long b) { if (a == b) return a; if (a < b) return GetGCD(b, a); while(true) { long temp = b; b =
2013-12-10 16:24:42 639
原创 110703 Euclid problem
import java.util.*;public class Main { private static void EuclidAlgorithm(int a, int b) { if (a < b) { EuclidAlgorithm(b, a); int temp = ResultX; ResultX = ResultY; ResultY = te
2013-12-05 17:56:49 681
原创 110706 Smith Numbers
import java.util.*;import static java.lang.Math.*;public class Main { private static List s_Primes; static { s_Primes = new LinkedList(); s_Primes.add(2L); long limit = (long)sqrt(200000
2013-12-05 14:43:25 604
原创 110705 Summation of Four Primes
import java.util.*;import static java.lang.Math.*;public class Main { private static Map s_PrimesInfo; static { s_PrimesInfo = new HashMap(); } private static boolean IsPrime(int x) { B
2013-12-04 14:40:43 522
原创 110704 Factovisors
import java.util.*;import static java.lang.Math.*;public class Main { private static boolean IsPrime(int x) { int mid = (int)(sqrt(x)); for (int i = 2; i <= mid; ++i) if ((x % i) == 0)
2013-12-04 13:13:33 580
原创 110702 Carmichael Numbers
import java.util.*;import static java.lang.Math.*;public class Main { private static boolean IsPrime(long number) { long mid = (long)(sqrt((double)number)); for (long i = 2; i <= mid; ++i)
2013-12-02 14:05:48 489
原创 110701 Light, more light
//import java.io.*;import java.util.*;import static java.lang.Math.*;class Main implements Runnable{ /* static String ReadLn(int maxLength){ // utility function to read from stdin,
2013-12-02 13:55:11 686
c++语言的设计和演化
2009-07-22
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人