#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
int main() {
int money = 20;
int bottle = 0;
while (money != 0) {
bottle += money;
money /= 2;
}
printf("%d\n", bottle + 1);
system("pause");
return 0;
}
喝汽水,1瓶汽水1元,2个空瓶可以换一瓶汽水, 给20元,可以喝多少汽水
猜你喜欢
转载自blog.csdn.net/Whitebury/article/details/89212625
今日推荐
周排行