Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input_file = open('input.txt')
- M, N = [int(i) for i in input_file.readline().split()]
- a = ''
- l = [True for i in range(N + 1)]
- l[1] = l[0] = False
- for i in range(2, N + 1):
- if l[i] == True:
- for j in range(i * i, N + 1, i):
- if j % i == 0:
- l[j] = False
- for i in range(M, N + 1):
- if l[i] == True:
- print(i)
- a = ' '
- if a == '':
- print('Absent')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement