#!/usr/bin/python
# -*- coding: UTF-8 -*-

h = 0
leap = 1
from math import sqrt
from sys import stdout
for m in range(101,201):
    k = int(sqrt(m + 1))
    for i in range(2,k + 1):
        if m % i == 0:
            leap = 0
            break
    if leap == 1:
        print '%-4d' % m
        h += 1
        if h % 10 == 0:
            print ''
    leap = 1
print 'The total is %d' % h

 

相关文章:

  • 2022-12-23
  • 2021-11-25
  • 2021-12-13
  • 2022-01-14
  • 2021-10-22
  • 2021-12-31
  • 2021-10-16
猜你喜欢
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2021-08-31
  • 2021-06-26
  • 2022-12-23
  • 2021-12-14
相关资源
相似解决方案