#include<stdio.h>
unsigned _int64 hanoi(int n);
int main()
{
int n;
printf("input n:");
scanf("%d",&n);
printf("\nresult:");
printf("%I64u",hanoi(n));
getch();
}
unsigned _int64 hanoi(int n)
{
if(n==1)
{
return 1;
}
else
{
return (2*hanoi(n-1)+1);
}
unsigned _int64 hanoi(int n);
int main()
{
int n;
printf("input n:");
scanf("%d",&n);
printf("\nresult:");
printf("%I64u",hanoi(n));
getch();
}
unsigned _int64 hanoi(int n)
{
if(n==1)
{
return 1;
}
else
{
return (2*hanoi(n-1)+1);
}
}