P8711 [Lanqiao Cup 2020 NOI Qualifier B1] Divisibility Sequence
Description
There is a sequence. The first number of the sequence is $n$, and each following number is the previous number integer-divided by $2$. Please output the terms in this sequence whose values are positive.
Input Format
Input one line containing an integer $n$.
Output Format
Output one line containing multiple integers. Adjacent integers should be separated by one space, representing the answer.
Explanation/Hint
For $80\%$ of the testdata, $1 \le n \le 10^9$.
For all testdata, $1 \le n \le 10^{18}$.
Lanqiao Cup 2020, first round provincial contest, Group B, Problem F.
Translated by ChatGPT 5