Example #1
0
def Euler_124(top = 100000):
    alist = []
    for n in range(1,top+1):
        aset = set(findallfactors(n))
        rad = 1
        for i in aset:
            rad*=i
        alist.append([rad,n])
    ret = sorted(alist)
    return ret[10000-1]
Example #2
0
def Euler_124(top=100000):
    alist = []
    for n in range(1, top + 1):
        aset = set(findallfactors(n))
        rad = 1
        for i in aset:
            rad *= i
        alist.append([rad, n])
    ret = sorted(alist)
    return ret[10000 - 1]
Example #3
0
def check(n, k):
    x = findallfactors(n)
    if len(x) == 1: return False
    if len(x) > k: return False
    if sum(x) + k - len(x) >= n: return True
    else: return False
Example #4
0
def check(n,k):
    x = findallfactors(n)
    if len(x)==1:return False
    if len(x)>k:return False
    if sum(x)+k-len(x)>=n:return True
    else:return False