> max=0 > m=0 > while m<=1000000: > m+=1 > count=0 > n=m > while n!=1: > count+=1 > if n%2==0: > n=n//2 > else: > n=3*n+1 > if count>max: > max=count > num=m > print(num,max) >
I have tried to run your program with pypy (Python git compiler) (http://pypy.org/), it runs about 15x faster (8 sec instead of 2m2sec in my old Celeron M420 computer). Olive -- http://mail.python.org/mailman/listinfo/python-list