示例#1
0
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);
示例#2
0
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)
示例#3
0
def run_test():
    eulersupport.name = "euler21"
    # eulersupport.write_output("I'd no test :(");
    eulermath.is_amicable(220)
示例#4
0
def run_test():
    eulersupport.name = "euler21";
    # eulersupport.write_output("I'd no test :(");
    eulermath.is_amicable(220);