Advertisement
boris-vlasenko

66

Jan 13th, 2016
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. def d(a):
  2.     res = 2
  3.     for i in range(2,a // 2 + 1):
  4.         if a % i == 0:
  5.             res += 1
  6.     return res
  7.  
  8. k = 1
  9. i = 2
  10. print(1)
  11. while k < 100:
  12.     if d(i) == 2:
  13.         k += 1
  14.         print(i)
  15.     i += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement