예제 #1
0
파일: euler.py 프로젝트: arma26/challenge
def p35():
    T = lc.sieve_of_eratosthenes(1000000)
    S = [sorted(str(p)) for p in T]
    C = []
    for s in S:
        if S.count(s) == len(s):
            C.append(str(s))
    print sorted(str(c) for c in C)
    print len(C)
예제 #2
0
파일: euler.py 프로젝트: arma26/challenge
def p10():
    print sum(lc.sieve_of_eratosthenes(2*10**6))
예제 #3
0
파일: euler.py 프로젝트: arma26/challenge
def p3():
    print lc.sieve_of_eratosthenes(600851475143)[-1:]