我总是记不住电话号码。我需要一个记忆规则。


当前回答

这就是我如何记住2147483647的:

214 -因为2.14近似于pi-1 48 = 6*8 64 = 8*8

横向写:

214_48_64_
and insert:
   ^  ^  ^
   7  3  7 - which is Boeing's airliner jet (thanks, sgorozco)

现在你得到了2147483647。

希望这能有所帮助。

其他回答

在Objective-C (iOS和OSX)中,只需要记住这些宏:

#define INT8_MAX         127
#define INT16_MAX        32767
#define INT32_MAX        2147483647
#define INT64_MAX        9223372036854775807LL

#define UINT8_MAX         255
#define UINT16_MAX        65535
#define UINT32_MAX        4294967295U
#define UINT64_MAX        18446744073709551615ULL

它是10位数字,所以假装它是一个电话号码(假设你在美国)。214-748-3647。我不建议调用它。

最大负值(32位):-2147483648 (1 << 31)

最大正(32位)值:2147483647 ~(1 << 31)

记忆:“醉酒又好色”

drunk ========= Drinking age is 21
AK ============ AK 47
A ============= 4 (A and 4 look the same)
horny ========= internet rule 34 (if it exists, there's 18+ material of it) 

21 47 4(years) 3(years) 4(years)
21 47 48       36       48

“如果一个巨大的整数没有被回忆起,你就回忆这个助记符。”

现在数数每个单词中的字母。

我能想到的最正确的答案是Int32.MaxValue。