解题思路:
注意事项:
参考代码:
public class 不容易系列 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner(System.in);
int N = in.nextInt();
int a;
while (N > 0) {
a = in.nextInt();
int[] arrays = new int[31];
arrays[0] = 3;
for (int i = 1; i < arrays.length; i++) {
arrays[i] = 2 * (arrays[i - 1] - 1);
}
System.out.println(arrays[a]);
N--;
}
}
}
0.0分
0 人评分
2003年秋浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:746 |
简单的a+b (C语言代码)浏览:681 |
A+B for Input-Output Practice (II) (C语言代码)浏览:990 |
兰顿蚂蚁 (C++代码)浏览:1044 |
wu-理财计划 (C++代码)浏览:827 |
哥德巴赫曾猜测 (C语言代码)浏览:2317 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:468 |
C语言程序设计教程(第三版)课后习题6.1 (C语言代码)浏览:545 |
1009题解浏览:736 |
1013题解浏览:553 |