杭电ACM2042题

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2042

简单的递推题。’

#include<stdio.h>
int main()
{
    int n,a,m;
    scanf("%d",&n);
    while(n--)
    {
        scanf("%d",&a);
        m=3;
        while(a--)
        {
            m=(m-1)*2;
        }
        printf("%d\n",m);
    }
    return 0;
}   

猜你喜欢

转载自blog.csdn.net/qq_43104182/article/details/82427015