1244: 【基础】求2+2*2+2*2*2+…+2*2*2*….*2
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:3
Solved:3
Description
求2+2*2+2*2*2+…+2*2*2*….*2的和是多少?最后一项有多少2相乘由键盘读入的n决定(1<=n<=100)!
比如:n=3,那么s=2+2*2+2*2*2=14!
Input
从键盘读入一个整数n(1<=n<=100)
Output
输出求出的和
Sample Input Copy
3
Sample Output Copy
14