diff --git a/problem/P7071/P7071.cpp b/problem/P7071/P7071.cpp new file mode 100644 index 00000000..86f69380 --- /dev/null +++ b/problem/P7071/P7071.cpp @@ -0,0 +1,19 @@ +#include + +using namespace std; + +int main() { + int n; + cin >> n; + if (n & 1) { + cout << -1 << endl; + } + else { + for (int i = 24; i > 0; i--) { + if (n >> i & 1) { + cout << (1 << i) << ' '; + } + } + } + return 0; +}