【Python】求素数-稍加优化
摘要:
print 'Find prime number smaller then input number \n'print 'Please input a number:'import datetimebegintime=datetime.datetime.now()number=raw_input()num=1end=[]b=0n=0while num1:break div+=1 if n==1: end.append(num) num+=1 n=0print "The prime number smaller then %s are:\n" 阅读全文
posted @ 2013-08-18 14:48 colipso 阅读(517) 评论(0) 推荐(0) 编辑