def run(upperbound): s = 0; #Sum of all amicable numbers. for i in xrange(1, upperbound +1): # print i; if(eulermath.is_amicable(i)): eulersupport.log(i, "is amicable."); s += i; #Report completion. eulersupport.write_output(s);
def run(upperbound): s = 0 #Sum of all amicable numbers. for i in xrange(1, upperbound + 1): # print i; if (eulermath.is_amicable(i)): eulersupport.log(i, "is amicable.") s += i #Report completion. eulersupport.write_output(s)
def run_test(): eulersupport.name = "euler21" # eulersupport.write_output("I'd no test :("); eulermath.is_amicable(220)
def run_test(): eulersupport.name = "euler21"; # eulersupport.write_output("I'd no test :("); eulermath.is_amicable(220);