魏老四OJ
Home
ProblemSet
Source/Category
Contest
题单
Status
Ranklist
F.A.Qs
Login
1281: 【基础】求2+2*2+2*2*2+…+2*2*2*….*2
Memory Limit:128 MB
Time Limit:1.000 S
:
Creator:
Submit:5
Solved:4
Submit
Statistics
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
3
Sample Output
14
Source/Category
高精度算法
Submit
Statistics