第12题:
拥有超过500个因数的第一个三角数(1+2+3+4+......)
def findivisionnum(num): count = 0 n=1 import math while count
第14题:
def findlength(n): count = 0 while n!=1: if not n%2: n /=2 count +=1 else: n =3*n+1 count +1 countcopy=count count=0 return countcopydef lengthmax(num): i=1 max_count=1 max_number=0 while i<=num: if max_count
第15题:
def findsum1(num1): root=1 for i in range(1,2*num+1): root *= i for i in range(1,num+1): root /= i root /= i return rootprint findrout(20)