int main()
{
int a = 20;
int he = 0;
int kong = 0;
he = a;
kong = he;
while (kong > 1)//只要空瓶有两个或以上就能继续换来喝。
{
he = he + kong / 2;
kong = kong / 2 + kong % 2;
}
printf("%d\n", he);
return 0;
}
int main()
{
int a = 20;
int he = 0;
int kong = 0;
he = a;
kong = he;
while (kong > 1)//只要空瓶有两个或以上就能继续换来喝。
{
he = he + kong / 2;
kong = kong / 2 + kong % 2;
}
printf("%d\n", he);
return 0;
}