hdu2013
蟠桃记
http://acm.hdu.edu.cn/showproblem.php?pid=2013
1
2 #include
3 int tao(int day)
4 {
5 if(day==1) return 1;
6 else
7 return 2*tao(day-1)+2;
8
9
10 }
11 void main()
12 {
13 int n;
14 while(scanf("%d",&n)!=EOF)
15 printf("%d\n",tao(n));
16
17 }.
hdu2013 (2008-06-02 12:31:01由czk编辑)