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


当前回答

这就是我记住2147483647的方法

在遥远的大草原上,擎天柱三人对着四十个七分咒

2 - To
1 - A
4 - Far
7 - Savannah
4 - Quarter
8 - Optimus
3 - Trio
6 - Hexed
4 - Forty
7 - Septenary

其他回答

不要把它看成一个大数字,试着把它分解,然后寻找相关的想法。例如:

斯诺克的最大击球次数为2次(最大击球次数为147次) 4年(48个月) 3年(36个月) 4年(48个月)

上述适用于最大的负数;正的是- 1。

也许上面的分类对你来说不会再令人难忘了(它并不令人兴奋!),但希望你能想出一些令人难忘的主意!

如果你碰巧记住了你的ASCII表而不是MaxInt: gh6g = 21 47 48 36 47

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

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

在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

最简单的方法是查看std::numeric_limits< int >::max()

例如(来自MSDN),

// numeric_limits_max.cpp

#include <iostream>
#include <limits>

using namespace std;

int main() {
   cout << "The maximum value for type float is:  "
        << numeric_limits<float>::max( )
        << endl;
   cout << "The maximum value for type double is:  "
        << numeric_limits<double>::max( )
        << endl;
   cout << "The maximum value for type int is:  "
        << numeric_limits<int>::max( )
        << endl;
   cout << "The maximum value for type short int is:  "
        << numeric_limits<short int>::max( )
        << endl;
}