Problem N: 猴子吃桃

#include<stdio.h>
int main()
{
    int n,s,i;
    while(scanf("%d",&n)!=EOF){
    s=1;
    for(i=n-1;i>=1;i--)
    {
        s=2*(s+1);
    }
    printf("%d",s);}
    return 0;
}

 

posted @ 2018-10-28 10:47  MichaelCecil  阅读(737)  评论(0编辑  收藏  举报