| 记录编号 | 557522 | 评测结果 | AAAAAAAAAAAAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 3498.[CSP 2020J]优秀的拆分 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.000 s | ||
| 提交时间 | 2020-11-17 19:38:30 | 内存使用 | 0.00 MiB | ||
#include <bits/stdc++.h>
using namespace std;
int main(){
freopen("csp2020pj_power.in","r",stdin);
freopen("csp2020pj_power.out","w",stdout);
long long a,b,c,d;
cin>>a;
b=2;
c=2;
if(a%2!=0){
cout<<-1<<endl;
return 0;
}else{
for(;;){
if(b>a){
if(a<=0){
return 0;
}
b/=2;
a-=b;
cout<<b<<" ";
b=2;
}else{
b*=c;
}
}
}
}