class Main {
public static void main(String[] args) {
int totalpeach = 0;
int day = 10;
int lastdaypeach = 1;
totalpeach = totalPeach(10,1);
System.out.println(totalpeach);
}
private static int totalPeach(int day,int lastdaypeach){
int total = 0;
int loopnum = day - 1;
int temp = lastdaypeach + 1 ;
for(int i = 0 ; i < loopnum ; i++){
total = temp * 2;
temp = total+1;
System.out.println("第"+(loopnum-i)+"天 "+total);
}
return total;
}
}