시간 제한메모리 제한제출정답맞힌 사람정답 비율
0.25 초 512 MB34228225682.315%

문제

Given a positive integer n, find the positions of all 1’s in its binary representation. The position of the least significant bit is 0.

Write a program that:

  • reads a positive integer n from the standard input,
  • computes the positions of 1’s in the binary representation of n,
  • writes the result to the standard output.

입력

The first and only line of the input contains exactly one integer n, 1 ≤ n ≤ 106.

출력

The output should contain increasing sequence of integers separated by single spaces — the positions of 1’s in the binary representation of the input number.

예제 입력 1

13

예제 출력 1

0 2 3