Feedback
Time limit1sMemory limit512 MB
Build a strictly increasing length-N sequence with values at most 1000, second element 2, and last element prime.
- Level
Easy3 of 10
- Topics
- Math, Number theory, Greedy, Implementation
- Solved
- No attempts yet
Problem
Given , find a sequence that satisfies the following conditions.
- The length of is .
- For , must hold.
- must hold.
- must be .
- must be a prime number.
Input
The first line gives .
Output
On the first line, print .
On the second line, print separated by spaces.