#include <stdio.h>
void jiu(int &kp,int &gai,int &count)
{
if(kp<2&&gai<4) return;
if(kp>=2)
{
count+=kp/2;
gai+=kp/2;
kp=kp%2+kp/2;
}
if(gai>=4)
{
count+=gai/4;
kp+=gai/4;
gai=gai%4+gai/4;
}
jiu(kp,gai,count);
}
main()
{
int a=10,count,kp,gai;
count=a/2;
kp=a/2;
gai=a/2;
jiu(kp,gai,count);
printf("总共喝了%d瓶酒,还剩%d个空瓶,%d个盖!\n",count,kp,gai);
}