Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n,m = map(int,input().split())
- A = [True] * (m)
- answer = 0
- found = False
- i = 2
- while i * i <= m:
- if A[i-1]:
- j = i*i
- while j <= m:
- A[j-1] = False
- j += i
- i += 1
- for i in range(n,m+1):
- if A[i-1]:
- print(i)
- found = True
- if not found:
- print('Absent')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement