int money = 0;//定义开始金额int start = 1;//第一天的钱for(int i = 0; i < 30; i ++){ if(start == 1) { start = start*2; money += 1; break; }else{ start = start*2; } money += start;}syso(money)