灌水=======标题太短了 啊啊啊啊啊啊啊
摘要:```cpp
#include
using namespace std;
int main()
{
int n;
int sum;
while((scanf("%d",&n)) !……
编写题解 1072: 汽水瓶java
摘要: import java.util.Scanner;
public class Main {
public static void main(String[] args) {
S……
汽水题:较为标准的Python解法,参考了ChatGpt。
摘要:解题思路:注意事项:参考代码:def calculate_max_sodas(n): if n < 2: return 0 total_sodas = 0 remain……
1072基础解法(Python)
摘要:解题思路:简单思路注意事项:了解divmod()函数的基础用法参考代码:import sysfor line in sys.stdin : bot = int(line) if bot =……
1072:汽水瓶 Java题解
摘要:思路:该解决方案使用了循环迭代的方法来计算最多可以喝的汽水瓶数。我们不断将空汽水瓶按照规定的换瓶规则进行兑换,每次兑换后计算新的空瓶数,直到剩余的空瓶数不足以再进行一次兑换。具体的做法是,将空瓶数n除……
减啊减,减完答案就出来了
摘要:解题思路:空瓶子是不断消耗减少的,当空瓶子只剩两个时做最后一次+1运算,得结果。注意事项:余二进一参考代码:#include<stdio.h>int get(int n);int main(){ in……