Maths
Time limit1sMemory limit1024 MB
Given n, find integers a_1 to a_n, each between 1 and 300, so that every prefix sum for k from 2 to n has exactly a_k divisors, or report Impossible.
- Level
Medium5 of 10
- Topics
- Number theory, Math, Brute force
- Solved
- No attempts yet
Statement
Android Vasya attends Maths classes. His group started to study number theory recently. The teacher gave them several tasks as homework. One of them is as follows.
There is an integer . The problem is to find a sequence of integers such that for every from 2 to , the sum has exactly different positive divisors. Help Vasya solve this task.
Input
The only line contains an integer ().
Output
If there is no such sequence, output Impossible. Otherwise, output the space-separated integers ().