17 ms·
Using 64 bit integers, we can store the square of any 32 bit integer. Not that small...
by williamkuszmaul 4y ago
Using 64 bit integers, we can store the square of any 32 bit integer. Not that small...
- ciupicri 4y agoAlso it was 2004 and 64 bit machines weren't common. If I remember correctly you had only 2 GB available under Windows XP and if you wanted more, 3 GB to be more precise, you had to boot with a special parameter.
- saagarjha 4y ago32-bit machines generally 64-bit arithmetic of some sort; for example "long long" in C is mandated by the standard to be of a width greater than or equal to 64 bits.
- ciupicri 4y agoYeah, 64 bit integers were available under gcc on Linux, but the memory issue remained. The array had to fit in 2 GB, unless of course the problem stated otherwise, for example the numbers were read from a file.