c文件
#include<stdio.h>
#include<math.h>
typedef long User_type;
#include "stack.h"
int main()
{
User_type a,b;
Stack *head=NULL;
long k=0,t=0;
scanf("%d",&a);
b=a;
while(b!=0)
{
b=b/10;
k++;
}
b=a;
initStack(&head,k);
while(k>0)
{
push(head,a%10);
a=a/10;
k--;
}
b=0;
while(head->top>0)
{
pop(head,&a);
b=b+pow(2,head->top)*a;