int main(int argc, char *argv[]) {
int day,x1,x2;
day=9;
x2=1;
do{
x1=(x2+1)*2;
x2=x1;
day--;
}while(day>0);
printf("total=%d\n",x1);
}
逆向思维!
total=1534
int main(int argc, char *argv[]) {
int day,x1,x2;
day=9;
x2=1;
do{
x1=(x2+1)*2;
x2=x1;
day--;
}while(day>0);
printf("total=%d\n",x1);
}
逆向思维!
total=1534