#C11891. Interesting Sequence
Interesting Sequence
Interesting Sequence
Given an integer n, you are required to generate an interesting sequence of n positive integers. The sequence is defined by the formula:
$$ a_i = 2^{i-1}, \quad 1 \le i \le n $$
If n is less than 1, it is impossible to generate such a sequence and you should output the string impossible
.
The sequence values should be printed in one line separated by a single space.
inputFormat
The input is provided via stdin as a single integer n.
outputFormat
If n is at least 1, output the sequence of n positive integers (i.e. 1 2 4 8 ...
) separated by a single space. Otherwise, output impossible
.
1
1