renjii

李沐霖  •  26天前


//"噁乨衞籾"

include <bits/stdc++.h>

using namespace std; int n; long long a[30];

int main() {

cin >> n;
if (n % 2 == 1) {
	cout << "-1";
	return 0;
}
a[1] = 1;
for (int i = 2; i <= 26; i++) {
	a[i] = a[i - 1] * 2;
}
for (int i = 26; i >= 2; i--) {
	if (n >= a[i]) {
		n -= a[i];
		cout << a[i] << ' ';
	}
	if (n == 0) {
		return 0;
	}
}
return 0;

}


评论:

请先登录,才能进行评论