题解
2023-08-12 16:03:54
发布于:浙江
1阅读
0回复
0点赞
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
long long zlnum = 1,zl = 1,res = 0,cnt = 0;
while(zlnum<=N){
res++;
zl *= 2;
zlnum += zl;
}
cout << res << endl;
zlnum = 1;
zl = 1;
while(zlnum<=N){
cout << zl << endl;
zl *= 2;
zlnum += zl;
}
return 0;
}
这里空空如也
有帮助,赞一个