10月31日和12月25日是否是同一天?

本文通过两个经典的笑话展示了不同数制之间的转换如何成为笑料。首先介绍了一个关于二进制理解的世界观划分,接着解释了为什么数学家会混淆万圣节与圣诞节的原因,涉及八进制与十进制的换算。
部署运行你感兴趣的模型镜像

There are only 10 types of people in the world: those who understand binary, and those who don't.

This joke relies on the fact that mathematical expressions, just as expressions in natural languages, may have multiple meanings. Like other puns, the humor is derived from an ambiguous meaning; in this case, the expression 10 in the binary numeral system is equal to the decimal number two.

Another pun using different radices, sometimes attributed to computer scientists, asks:

Why do mathematicians always confuse  Halloween and  Christmas?
Because 31  Oct = 25  Dec.

The humor lies in the similarity of the abbreviation for October/Octal and December/Decimal, and the coincidence that the two representations equal the same amount (31 Octal is 3*8 + 1 = 2*10 + 5 = 25 Decimal).

 

 

 

您可能感兴趣的与本文相关的镜像

Dify

Dify

AI应用
Agent编排

Dify 是一款开源的大语言模型(LLM)应用开发平台,它结合了 后端即服务(Backend as a Service) 和LLMOps 的理念,让开发者能快速、高效地构建和部署生产级的生成式AI应用。 它提供了包含模型兼容支持、Prompt 编排界面、RAG 引擎、Agent 框架、工作流编排等核心技术栈,并且提供了易用的界面和API,让技术和非技术人员都能参与到AI应用的开发过程中

计算两个期之间的星期差异,可以通过多种方法确定某一天是星期几。已知 **2022年10月1是星期六**,要求 **1997年10月1是星期几**,可以通过以下方式进行计算: --- 利用期差计算星期数: - 两个期相差 $ 2022 - 1997 = 25 $ 年。 - 其中包含的闰年数为:1998年、2002年、2006年、2010年、2014年、2018年、2022年(共 6 个闰年)。 - 每个平年有 365 天,即 $ 365 \equiv 1 \mod 7 $,每个闰年多一天,即 $ 366 \equiv 2 \mod 7 $。 - 因此,25 年间的星期数偏移为:$$ (25 - 6) \times 1 + 6 \times 2 = 19 + 12 = 31 \equiv 3 \mod 7 $$。 - 由于 2022 年 10 月 1 是星期六,向前推 3 天,得到 1997 年 10 月 1 是 **星期三**。 --- 使用编程语言直接计算: Python 提供了 `datetime` 模块,可以快速获取指定期的星期几: ```python import datetime date = datetime.date(1997, 10, 1) print(date.strftime("%A")) ``` 运行上述代码将输出 `Wednesday`,表示 1997 年 10 月 1 是 **星期三**。 --- 应用基姆拉尔森公式(Zeller's Congruence)进行手动计算: 基姆拉尔森公式适用于公历期计算星期几,其公式如下: 对于公历年份 $ Y $,月份 $ m $,期 $ d $,若月份小于 3,则将月份加 12,并将年份减 1。令: - $ h = (d + \left\lfloor \frac{13(m+1)}{5} \right\rfloor + K + \left\lfloor \frac{K}{4} \right\rfloor + \left\lfloor \frac{J}{4} \right\rfloor + 5J) \mod 7 $ - 其中 $ K = Y \mod 100 $,$ J = \left\lfloor \frac{Y}{100} \right\rfloor $ 结果 $ h $ 的取值对应星期如下: - 0 = 星期六 - 1 = 星期 - 2 = 星期一 - 3 = 星期二 - 4 = 星期三 - 5 = 星期四 - 6 = 星期五 将 1997 年 10 月 1 代入公式计算,最终结果为 $ h = 4 $,对应 **星期三**。 ---
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值