| 比赛 | 20130923 | 评测结果 | AAAAAAAAAA |
|---|---|---|---|
| 题目名称 | 鬼谷子的钱袋 | 最终得分 | 100 |
| 用户昵称 | KZNS | 运行时间 | 0.003 s |
| 代码语言 | C++ | 内存使用 | 0.31 MiB |
| 提交时间 | 2015-10-12 20:34:10 | ||
// KZ's
#include <fstream>
#include <vector>
using namespace std;
int main() {
ifstream fin ("wallet.in");
ofstream fout ("wallet.out");
int t;
vector<int>u;
fin>>t;
while(t) {
u.push_back((t+1)/2);
t/=2;
}
fout<<u.size()<<endl;
for (int i=u.size()-1;i>=0;i--)
fout<<u[i]<<' ';
return 0;
}
// UBWH