这道数学题能让目前所有 AI 原地爆炸

179 天前
 ayang23

一水池有甲和乙两根进水管,丙一根排水管。空池时,单开甲水管,5 个小时可将水池注满;单开乙水管,6 个小时可将水池注满;满池水时单开丙水管,4 个小时可将水池排空。如果按照甲、乙、丙、甲、乙、丙……的顺序轮流各开一个小时,要将水池注满需要多少个小时?

测了一下各种模型,只有 deepseek 最大的模型深度思考能做出来,但过程非常漫长,一直推翻自己的结论,耗时 446 秒,没测 chatgpt 的深度思考,因为没号。其他全错。

9707 次点击
所在节点    分享发现
105 条回复
murmur
179 天前
deepseek 开深度思考太磨叽了,我给他换了个问法

一水池有甲和乙两根进水管,丙一根排水管。空池时,单开甲水管,5 个小时可将水池注满;单开乙水管,6 个小时可将水池注满;满池水时单开丙水管,4 个小时可将水池排空。如果按照甲、乙、丙、甲、乙、丙……的顺序轮流各开一个小时,要将水池注满需要多少个小时?试着用 js 代码编程解决这个题。


20 个小时对么 网上答案是 21.。。
HENQIGUAI
179 天前
claude 3.7 很快给出结果,20 个小时,不知道对不对,因为我也不会算这题
xdzjj
179 天前
@murmur 21 肯定错。因为 3 小时的倍数小时的情况下,最后一小时是丙水管放水。所以 3 的整数小时的水位一定不大于 3/4
noobjalen
179 天前
o3-mini
rqYzyAced2NbD8fw
179 天前
rqYzyAced2NbD8fw
179 天前
OP 给一个标准答案。。
WngShhng
179 天前
这不是小学 6 年级的题吗,用豆包算都很快啊
bjzhou1990
179 天前
所以标准答案是啥,试了 3 个 AI 答案都不一样
realkaiway
179 天前
所以对吗?
ayang23
179 天前
DeepSeek 给出的答案如下,我感觉是对的,就是下面弄一堆小数解的不太好看:

要解决水池注满时间的问题,需要分析每个水管的效率,并按照轮流顺序逐步计算水量变化。

### 水管效率分析
- **甲进水管**:每小时注水量为水池的 1/5 。
- **乙进水管**:每小时注水量为水池的 1/6 。
- **丙排水管**:每小时排水量为水池的 1/4 。

### 轮流顺序与水量变化
按照甲、乙、丙的顺序轮流各开 1 小时,每 3 小时为一个周期。每个周期的净水量变化为:
\[
\frac{1}{5} + \frac{1}{6} - \frac{1}{4} = \frac{7}{60}
\]
即每周期 3 小时,水池水量增加 7/60 。

### 逐步计算
1. **前 6 个周期( 18 小时)**:水量累计增加:
\[
6 \times \frac{7}{60} = \frac{42}{60} = 0.7
\]
2. **第 7 周期开始**:
- **第 19 小时(甲开)**:水量增加 1/5 ,总量为 0.7 + 0.2 = 0.9 。
- **第 20 小时(乙开)**:需要注入 0.1 才能满。乙的注水速度为 1/6 每小时,所需时间为:
\[
\frac{0.1}{\frac{1}{6}} = 0.6 \text{小时( 36 分钟)}
\]
因此,总时间为 19 小时 + 0.6 小时 = **19.6 小时**。

### 结论
按照甲、乙、丙的顺序轮流各开 1 小时,水池注满需要 **19 小时 36 分钟**(即 19.6 小时)。

**答案:** 需要 19 小时 36 分钟(或表示为\(\frac{98}{5}\)小时)。
soulflysimple123
179 天前
public class WaterPool {
public static void main(String[] args) {
double capacity = 1.0; // 代表满池
double current = 0.0; // 当前水量
double[] rates = {1.0/5.0, 1.0/6.0, -1.0/4.0}; // 甲、乙、丙每小时进出水比例
int hour = 0;

// 每小时轮流开甲、乙、丙水管
while (current < capacity) {
// 计算当前水管索引
int index = hour % rates.length;
current += rates[index];
hour++;
if (current >= capacity) break;
if (current < 0) current = 0; // 防止出现负值
}

System.out.println("需要的小时数: " + hour);
}
} 结果是 20
ayang23
179 天前
ayang23
179 天前
ayang23
179 天前
@realkaiway 这个正解 GPT o1 pro
soulflysimple123
179 天前
1/6 转为浮点有精度丢失,改为 apache 的 Fraction 类

import org.apache.commons.math3.fraction.Fraction;

public class WaterPoolRecalc {
public static void main(String[] args) {
Fraction capacity = new Fraction(1, 1);
Fraction current = Fraction.ZERO;
// 甲、乙、丙的流量分别是 1/5 、1/6 、-1/4
Fraction[] flows = {
new Fraction(1, 5),
new Fraction(1, 6),
new Fraction(-1, 4)
};

int hours = 0;
while (current.compareTo(capacity) < 0) {
current = current.add(flows[hours % 3]);
hours++;
// 如果水量小于 0 则重置
if (current.compareTo(Fraction.ZERO) < 0) {
current = Fraction.ZERO;
}
}

System.out.println("需要的小时数:" + hours); // 输出 20
}
}
ayang23
179 天前
@noobjalen
@murmur 21 和 o3-mini 的都不对
ayang23
179 天前
@realkaiway 用时多少?
soulflysimple123
179 天前
时间还可以不是整数 ,疏忽了 ,改了下提示:结果是 19.6

import org.apache.commons.math3.fraction.Fraction;

public class WaterPool {

public static void main(String[] args) {
Fraction capacity = new Fraction(1, 1);
Fraction current = Fraction.ZERO;
// 甲、乙、丙的流量分别是 1/5 、1/6 、-1/4
Fraction[] flows = {
new Fraction(1, 5),
new Fraction(1, 6),
new Fraction(-1, 4)
};

int completeHours = 0;
while (current.compareTo(capacity) < 0) {
int index = completeHours % 3;
Fraction rate = flows[index];

// 计算当前水管需要多少时间才能刚好注满
if (rate.compareTo(Fraction.ZERO) > 0) { // 进水管
Fraction timeToFill = capacity.subtract(current).divide(rate);
// 如果需要的时间不超过 1 小时,那么就找到精确时间了
if (timeToFill.compareTo(Fraction.ONE) <= 0) {
System.out.println("最终结果: " + (completeHours + timeToFill.doubleValue()) + " 小时");
return;
}
}
// 否则,完成一个完整小时
current = current.add(rate);
completeHours++;
// 如果水量变为负,重置为 0
if (current.compareTo(Fraction.ZERO) < 0) {
current = Fraction.ZERO;
}
}

System.out.println("需要整数小时数: " + completeHours + " 小时");
}
}
NGGTI
179 天前
GPT 24.3
gemini 19.6
deepseek 19.36
豆包 19.6
grok 19.6
ayang23
179 天前
@NGGTI 可以啊

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1118105

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX