2009年3月7日星期六

python primes one-liner

aux = {}; [aux.setdefault(p, p) for p in range(2, 20000) if 0 not in [p%d for d in aux if p>=d*d]];

and the speed is terribly slow :D

没有评论: