题解 1072: 汽水瓶

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

优质题解

汽水瓶-题解(C语言代码)或许是最简单的代码

摘要:解题思路:注意题目最后的提示,拥有两个瓶子时可以找老板借汽水,然后将三个瓶子换的汽水还给老板把这个过程简单化,就是可以用两个瓶子作为代价去喝一瓶汽水好的,那我们就不拿三个瓶子去换了,只要一直去借汽水就……

汽水瓶-题解(C语言代码)

摘要:解题思路只需要在纸上列出来,再结合题目里面的输出例子,就能知道规律了      注意事项:需要多组测试 参考代码: #include int fun(int n) { if(n<2……

汽水瓶-题解(C语言代码)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){     int a,n,m;     while(scanf("%d",&a)){         if (a……

汽水瓶-题解(C语言代码)

摘要:解题思路:我是用假设的思路,假设可以喝几瓶,把假设的空瓶再放进去计算。注意事项:参考代码:#includeint main(){    int n,i,j;   for(j=1;j<11;j++)//……

汽水瓶-题解(C语言代码)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){     int a;     while(1)     {         scanf("%d",&a);  ……

汽水瓶-题解(C语言代码)

摘要:解题思路:注意事项:参考代码:#includeint main(){    int n;    while( scanf("%d",&n),n!=0){         printf( "%d\n",……

汽水瓶-题解(Python代码)

摘要:解题思路:注意事项:参考代码:while(1):    n=int(input())    if n==0:        break    else:        a=int(n/2)    pr……