1.6编程基础之一维数组_12计算2的N次方
总时间限制: 1000ms 内存限制: 65536kB
描述
任意给定一个正整数N(N<=100),计算2的n次方的值。
输入
输入一个正整数N。
输出
输出2的N次方的值。
样例输入
5
样例输出
32
提示
高精度计算
# include
using namespace std;
int main() {
int n;
cin>>n;
switch(n) {
case 1:
cout<
break;
case 2:
cout<
break;
case 3:
cout<
break;
case 4:
cout<
break;
case 5:
cout<
break;
case 6:
cout<
break;
case 7:
cout<
break;
case 8:
cout<
break;
case 9:
cout<
break;
case 10:
cout<
break;
case 11:
cout<
break;
case 12:
cout<
break;
case 13:
cout<
break;
case 14:
cout<
break;
case 15:
cout<
break;
case 16:
cout<
break;
case 17:
cout<
break;
case 18:
cout<
break;
case 19:
cout<
break;
case 20:
cout<
break;
case 21:
cout<
break;
case 22:
cout<
break;
case 23:
cout<
break;
case 24:
cout<
break;
case 25:
cout<
break;
case 26:
cout<
break;
case 27:
cout<
break;
case 28:
cout<
break;
case 29:
cout<
break;
case 30:
cout<
break;
case 31:
cout<
break;
case 32:
cout<
break;
case 33:
cout<
break;
case 34:
cout<
break;
case 35:
cout<
break;
case 36:
cout<
break;
case 37:
cout<
break;
case 38:
cout<
break;
case 39:
cout<
break;
case 40:
cout<
break;
case 41:
cout<
break;
case 42:
cout<
break;
case 43:
cout<
break;
case 44:
cout<
break;
case 45:
cout<
break;
case 46:
cout<
break;
case 47:
cout<
break;
case 48:
cout<
break;
case 49:
cout<
break;
case 50:
cout<
break;
case 51:
cout<
break;
case 52:
cout<
break;
case 53:
cout<
break;
case 54:
cout<
break;
case 55:
cout<
break;
case 56:
cout<
break;
case 57:
cout<
break;
case 58:
cout<
break;
case 59:
cout<
break;
case 60:
cout<
break;
case 61:
cout<
break;
case 62:
cout<
break;
case 63:
cout<
break;
case 64:
cout<
break;
case 65:
cout<
break;
case 66:
cout<
break;
case 67:
cout<
break;
case 68:
cout<
break;
case 69:
cout<
break;
case 70:
cout<
break;
case 71:
cout<
break;
case 72:
cout<
break;
case 73:
cout<
break;
case 74:
cout<
break;
case 75:
cout<
break;
case 76:
cout<
break;
case 77:
cout<
break;
case 78:
cout<
break;
case 79:
cout<
break;
case 80:
cout<
break;
case 81:
cout<
break;
case 82:
cout<
break;
case 83:
cout<
break;
case 84:
cout<
break;
case 85:
cout<
break;
case 86:
cout<
break;
case 87:
cout<
break;
case 88:
cout<
break;
case 89:
cout<
break;
case 90:
cout<
break;
case 91:
cout<
break;
case 92:
cout<
break;
case 93:
cout<
break;
case 94:
cout<
break;
case 95:
cout<
break;
case 96:
cout<
break;
case 97:
cout<
break;
case 98:
cout<
break;
case 99:
cout<
break;
case 100:
cout<
break;
}
return 0;
}