记:7两的容器为T,11两的容器为H;
step1:H满,倒进空的T,剩余4两;
step2:把这4两倒入T,同时盛满H,倒入T满,则剩余11-(7-4)=8两;
step3:把8两倒入空的T,则剩余1两;
step4:重复step1~3,又得到1两,stop.
记:7两的容器为T,11两的容器为H;
step1:H满,倒进空的T,剩余4两;
step2:把这4两倒入T,同时盛满H,倒入T满,则剩余11-(7-4)=8两;
step3:把8两倒入空的T,则剩余1两;
step4:重复step1~3,又得到1两,stop.