進口?數學
計數=0
為了什麽?質數?在?範圍(1,1001):
如果?all(素數%i!=0?為了什麽?我?在?range(2,int(math . sqrt(素數)+1)):
打印?(‘%-3d?%?素數,end =‘?‘)
計數+=1
如果?計數%8==0:print()