摘要: import sysdef isPrime(num): i = 2 while i < num: if 0 == (num%i): return False else: i = i + 1 return Trueif __name__ == '__main__': iInput = int(raw_input('Assign a number N:')) for j in range(2, iInput + 1): if(isPrime(j)): ... 阅读全文
posted @ 2012-10-19 23:26 hnrainll 阅读(2625) 评论(0) 推荐(0) 编辑