def Euler_56(n=100): alist = [a**b for a in range(100) for b in range(100)] print(len(alist)) Max = 0 for i in range(len(alist)): a = maths.sumdigs(alist[i]) if a > Max: Max = a return Max
def Euler_56(n = 100): alist = [a**b for a in range(100) for b in range(100)] print(len(alist)) Max = 0 for i in range(len(alist)): a = maths.sumdigs(alist[i]) if a>Max:Max = a return Max
def e119(top=30): alist = [] b = 2 while True: for e in range(2, 50): tmp = b**e if sumdigs(tmp) == b: alist.append(tmp) if len(alist) == top + 1: return alist[top] b += 1
def e119(top =30): alist = [] b = 2 while True: for e in range(2,50): tmp = b**e if sumdigs(tmp)==b:alist.append(tmp) if len(alist)==top+1:return alist[top] b+=1
def Euler_20(num = 100): f = maths.fact(100) ret = maths.sumdigs(f) return ret