摘要: #coding:utf-8import math# 在确定函数前,我们先来了解下算法# 有数 n 判断其是否是合数# 如果 n 除以 range(2,math.sqrt(n)+1) 能够整除,则是合数# 判断n是否是合数,是则为真,否则为假def is_composite(n): if n <... 阅读全文
posted @ 2015-04-02 23:32 r3call 阅读(263) 评论(0) 推荐(0) 编辑