Created
January 25, 2018 03:41
-
-
Save NuarkNoir/125b579a53e9cc7c67ed37440dbeb659 to your computer and use it in GitHub Desktop.
Книги Фёдора Меньшикова
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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