摘要: 题目大意:这是一个倒水的问题,有A,B两个杯子,现要你通过往A,B杯子中倒水,然后得到题目中所需要的水量,注意:题目要求的水量最后是放在B杯子中的,还有倒水的解不唯一; 1 #include<stdio.h> 2 int main() 3 { 4 int a,b,n,temp1,temp2; 5 while(scanf("%d%d%d",&a,&b,&n)!=EOF) 6 { 7 temp1=temp2=0; 8 while(1) 9 {10 if(temp1==0)11 {12 printf("fill A\n"); 阅读全文
posted @ 2011-12-13 22:08 弄月吟风 阅读(171) 评论(0) 推荐(0) 编辑