#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元,可以喝多少汽水
最新推荐文章于 2021-10-27 12:30:03 发布