fork(5) download
  1. # S. Kondrashov
  2. n = int(input())
  3. if n<=1 and n>100:
  4. print("INPUT DATA ERROR")
  5. i = 2
  6. k = 2
  7. res = []
  8. while i*k <=n:
  9. while i*k <=n:
  10. #print(i*k)
  11. if res.count(i*k) == 0:
  12. res.append(i*k)
  13. k = k + 1
  14. i = i + 1
  15. k = i
  16. res.sort()
  17. #for j in res:
  18. # print(j)
  19. print(res)
  20. print(len(res))
Success #stdin #stdout 0.01s 6360KB
stdin
10
stdout
4
6
8
9
10
5