| 比赛 | 20130923 | 评测结果 | AAAAAAAAAA |
|---|---|---|---|
| 题目名称 | 鬼谷子的钱袋 | 最终得分 | 100 |
| 用户昵称 | 1azyReaper | 运行时间 | 0.002 s |
| 代码语言 | C++ | 内存使用 | 0.31 MiB |
| 提交时间 | 2015-10-12 20:02:59 | ||
#include <fstream>
#include <algorithm>
#include <cmath>
#define MAX 7000000
using namespace std;
ifstream fin("wallet.in");
ofstream fout("wallet.out");
int n;
int work(int x,int y)
{
if(x==1);
else
work(x/2,y+1);
fout<<(x-x/2)<<' ';
return 0;
}
int main()
{
fin>>n;
fout<<(int)(log2(n))+1<<endl;
work(n,0);
return 0;
}