HDACM1390
练英语…
import java.util.Scanner;public class Main{public static void main(String[] args) {Scanner sc = new Scanner(System.in);int d = sc.nextInt();while(d-->0){int n = sc.nextInt();int count = 0;boolean isFirst = true;while (n>0) {if (n%2==1) {if (!isFirst) {System.out.print(" ");}System.out.print(count);isFirst = false;}n /= 2;count++;}System.out.println();}}
}