Skip to content

Instantly share code, notes, and snippets.

@NuarkNoir
Created January 25, 2018 03:41
Show Gist options
  • Save NuarkNoir/125b579a53e9cc7c67ed37440dbeb659 to your computer and use it in GitHub Desktop.
Save NuarkNoir/125b579a53e9cc7c67ed37440dbeb659 to your computer and use it in GitHub Desktop.
Книги Фёдора Меньшикова
"""
Input: start_int end_int
Output: Simple numbers in range from start_int to end_int
"""
k, n = map(int, input().split())
a = list(range(n+1))
a[1] = 0
lst = []
i = 2
while i <= n:
if a[i] != 0:
lst.append(a[i])
for j in range(i, n+1, i):
a[j] = 0
i += 1
flt = list(filter(lambda x: x >= k, lst))
print(" ".join([str(x) for x in flt]) if flt else "Absent")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment