Prime Till N

easy
Take as input n. Determine all prime numbers till n and print them on the same

Input Format

Integer

Output Format

Space separated integers on the same line

Constraints

  n <= 10 ^ 9

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.
Previous
Is Prime
Next
Reverse Integer

Related Questions