/**
* 蟠桃记
* 每天吃掉桃子总数一半多一个
*/
import java.util.*;
public class acm2013 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while(in.hasNextInt()){
int day = in.nextInt();
int sum = 1;
for(int i = 1 ; i<day ;i++){
sum = (sum + 1) * 2;
}
System.out.println(sum);
}
}
}acm2013
原文:http://blog.csdn.net/a736933735/article/details/43916211