跳到正文

休闲·娱乐

如何证明1+1≠2

liuzhuoran141516约 1 分钟
原文
文章信息与版本

文章信息

发布
2026年7月10日
收录
2026年7月24日
更新
2026年11月14日
篇幅
约 1 分钟

版本

  1. v2当前
  2. v1

因为 int 的容量为 −231∼−1-2^{31} \sim -1 和 0∼231−10 \sim 2^{31}-1。

所以 int 的总容量为 2322^{32}(正负数、00)。

于是,只要我们让代码输出一个 int 类型的 2322^{32},那么代码就会输出 00。

那我们可以开始证明了。

∵0=232\because 0=2^{32} ∴0+1=1=232+1\therefore 0+1=1=2^{32}+1 ∴1+1=1+1+0=1+1+232\therefore 1+1=1+1+0=1+1+2^{32}

若 1+1=21+1=2,两边同时除以 22:

∴1=3×231+1\therefore 1=3 \times 2^{31}+1

则 1=3×231+1=231+11=3 \times2^{31}+1=2^{31}+1,又 0=2320=2^{32},故 0=2310=2^{31},矛盾,故 1+1≠21+1 \ne 2。

原文