规律就是:如果是n个空瓶换一杯水,那么就说明n-1空瓶就可以喝一份水,如果有m个空瓶,那么可以喝到m/(n-1)份水 #include<iostream> using namespace std; int main(){ int n; while(cin >> n && n != 0){ cout << n/2 << endl; } return 0; }