Golden Thumb

1-on-1 tutor for math & coding
個人資料
正文

【一對一】黑客之魂 1 3 4 6

(2025-05-24 19:48:01) 下一個

24點挑戰|1, 3, 4, 6|HACKING: The Art of Exploitation

這不是一道普通的 24 點題。這是一本“黑客聖經”裏的例題。

—— Jon Erickson 所著《HACKING: The Art of Exploitation(第二版)》中寫道:

The essence of hacking is finding unintended or overlooked uses for the laws and properties of a given situation and then applying them in new and inventive ways to solve a problem—whatever it may be.

The following math problem illustrates the essence of hacking:
Use each of the numbers 1, 3, 4, and 6 exactly once with any of the four basic math operations (addition, subtraction, multiplication, and division) to total 24.
Each number must be used once and only once, and you may define the order of operations; for example, 3 * (4 + 6) + 1 = 31 is valid, however incorrect, since it doesn’t total 24.

中文翻譯如下:

“黑客的精髓,是在規則之中,發現那些被忽略的路徑,運用那些意想不到的可能性,解決問題——無論問題是什麽。”

下麵這道數學題,正體現了黑客精神:

請使用數字 1、3、4、6 各一次,結合加減乘除四則運算,使結果為 24。
每個數字隻能使用一次,括號的順序可以自由安排。
比如:3 × (4 + 6) + 1 = 31 是合法的表達式,但不是正確答案。

——

我第一次看到這題,是在多年前讀這本書的時候。書中講的是底層內存操作、緩衝區溢出、係統漏洞,而它開篇卻丟出這樣一道數學題。

我當時愣住了:這居然是一本黑客書的第一章?

但也就是那一刻,我才明白:真正的黑客,不是“鍵盤俠”,而是規則的藝術家。

[ 打印 ]
評論
目前還沒有任何評論
登錄後才可評論.