必过码可带走短码 摘要:解题思路:原题链接:汽水瓶解题思路:根据老板可以借水,可以变相理解为使用2个空瓶和老板换一瓶水,代码改写为参考代码:while 1: t=int(input()) if t == 0: …… 题解列表 2023年01月12日 0 点赞 0 评论 564 浏览 评分:0.0
无聊的星期六 摘要:标签个红色的,匪夷所思。解题思路:自己列一个表就知道了1=02=13=14=25=26=37=3参考代码:s=1 while s!=0: s=int(input()) if s=…… 题解列表 2024年04月19日 0 点赞 0 评论 414 浏览 评分:0.0
汽水瓶(python代码) 摘要:解题思路:注意事项:参考代码while True: n=int(input()) if n==0: break c=0 while n>=3: c=…… 题解列表 2024年03月17日 0 点赞 0 评论 592 浏览 评分:0.0
1072基础解法(Python) 摘要:解题思路:简单思路注意事项:了解divmod()函数的基础用法参考代码:import sysfor line in sys.stdin : bot = int(line) if bot =…… 题解列表 2023年05月24日 0 点赞 0 评论 589 浏览 评分:0.0
汽水瓶——三个空瓶换一瓶汽水 摘要:解题思路:稍微列一下,就很容易发现空瓶数与汽水数之间的关系注意事项:参考代码:for i in range(10): a = int(input()) if a == 0: …… 题解列表 2023年03月15日 0 点赞 0 评论 556 浏览 评分:0.0
汽水瓶(python代码) 摘要:def printf(x): total = 0 c = x//3 total = total+c d = x%3 x = d+c   题解列表 2023年01月16日 0 点赞 0 评论 445 浏览 评分:0.0
循环里的分类讨论 摘要:解题思路:一个数储存/3的余数,表示没用的空瓶子,一个数储存/3的整除,表示拿去换的瓶子注意事项:参考代码:c=0while True: x=int(input()) if x==0: …… 题解列表 2022年03月31日 0 点赞 0 评论 686 浏览 评分:0.0
1072: 汽水瓶 摘要:解题思路:注意事项:参考代码:while True: try: n = int(input()) if n == 0: &n 题解列表 2022年01月16日 0 点赞 0 评论 535 浏览 评分:0.0
求优化(感觉能优化) 摘要:```python def ds(a): sums=0 while a>1: sums+=int(a/3) if a%3==1: …… 题解列表 2019年11月24日 0 点赞 0 评论 1440 浏览 评分:2.0