首页 > 其他 > 详细

hdu2013

时间:2015-05-11 21:42:40      阅读:254      评论:0      收藏:0      [点我收藏+]

http://acm.hdu.edu.cn/showproblem.php?pid=2013

 1 #include<iostream>
 2 #include<stdio.h>
 3 #include<math.h>
 4 using namespace std;
 5 
 6 int main()
 7 {
 8     int n;
 9     while(cin>>n)
10     {
11         int sum=1,x;
12         for(int i=1;i<n;i++)
13         {
14             x=2*sum+2;
15             sum=x;
16         }
17         printf("%d\n",x);
18     }
19     return 0;
20 }

 

hdu2013

原文:http://www.cnblogs.com/xuesen1995/p/4495478.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!