#P8711. The Dividing Sequence
The Dividing Sequence
The Dividing Sequence
Given a positive integer \(n\), construct a sequence where the first term is \(n\) and every subsequent term is obtained by performing an integer division by 2 on the previous term. In other words, the sequence is defined as \(a_0 = n\) and \(a_i = \lfloor a_{i-1} / 2 \rfloor\) for \(i \ge 1\). Output all terms of the sequence that are positive.
inputFormat
The input consists of a single positive integer \(n\).
outputFormat
Output the positive numbers in the sequence separated by a single space.
sample
10
10 5 2 1