汽水瓶(python代码) 摘要:def printf(x): total = 0 c = x//3 total = total+c d = x%3 x = d+c   题解列表 2023年01月16日 0 点赞 0 评论 269 浏览 评分:0.0
必过码可带走短码 摘要:解题思路:原题链接:汽水瓶解题思路:根据老板可以借水,可以变相理解为使用2个空瓶和老板换一瓶水,代码改写为参考代码:while 1: t=int(input()) if t == 0: …… 题解列表 2023年01月12日 0 点赞 0 评论 371 浏览 评分:0.0
汽水瓶(应该是最简单的代码) 摘要:解题思路:注意事项:参考代码:#includeint main(){ int n,ans; while(scanf("%d",&n)&&n!=0){ ans=0; if(n==…… 题解列表 2023年01月11日 0 点赞 0 评论 330 浏览 评分:9.9
简单版汽水瓶代码 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int i = 0; for(i=0;i<10;i++) { int a = …… 题解列表 2023年01月05日 0 点赞 0 评论 339 浏览 评分:0.0
一切尽在代码中 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#define N 100int duihuan(int x) { int rest_kpz, qishui_total, ne…… 题解列表 2023年01月03日 0 点赞 0 评论 333 浏览 评分:0.0
(c语言)详细解读,算法简单易懂 摘要:解题思路:注意事项:参考代码:#include"stdio.h" void main(){ int battle=0,full=0,sum=0; //分别对应空瓶,满瓶,换到的数量 …… 题解列表 2023年01月03日 0 点赞 0 评论 269 浏览 评分:0.0
1072: 汽水瓶 摘要:####一瓶汽水的时间,解决问题:tw-1f377: ######懒得读题的时候就可以直接从输入输出判断题的要求,成功率60%:tw-1f366: ```c #include int main…… 题解列表 2022年12月27日 0 点赞 0 评论 349 浏览 评分:9.9
Work out the bottle problem 摘要:解题思路:注意题目给的信息,空杯子是3的倍数,就对获得的空杯子进行取余直到为2或0注意事项:时间的开销,当小于2时直接退出参考代码:#include<stdio.h>int main(){ int n…… 题解列表 2022年12月22日 0 点赞 0 评论 212 浏览 评分:0.0
汽水瓶C语言 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>int main(){ int n,sum,t,p; while(1) { …… 题解列表 2022年11月28日 0 点赞 0 评论 309 浏览 评分:9.9
1072: 汽水瓶 摘要:解题思路:当剩余瓶子数为2时,可以喝到的汽水加1,count为n/3的余数。注意事项: 当n=0时,退出程序。参考代码:#include<stdio.h> int main(){ int…… 题解列表 2022年11月16日 0 点赞 0 评论 332 浏览 评分:9.9