delete pics to save space
This commit is contained in:
11
1.2320.cpp
Normal file
11
1.2320.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#include<cstdio>
|
||||
int n,stk[50],top;
|
||||
int main()
|
||||
{
|
||||
scanf("%d",&n);
|
||||
while(n) stk[top++]=(n+1)>>1,n>>=1;
|
||||
printf("%d\n",top);
|
||||
while(top) printf("%d ",stk[--top]);
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user