AC

许许 · 发布于 2025-10-04 · 浏览 293 回复 0

include <bits/stdc++.h> using namespace std;

int main() { freopen("power.in", "r", stdin); freopen("power.out", "w", stdout); int n; cin >> n; if (n % 2 != 0) { printf("-1"); return 0; } else { while (n > 0) { long long p = 1; while (2 p <= n) { p = p 2; } cout << p << " "; n -= p; } } return 0; }

全部回复 共 0 条

还没有人回复。往下写第一条。

发表回复