Homework every week, and a contest every two months 👍
Writing in Python is like writing pseudocode. Suppose you know, that
\[ e^x=\sum_{k=0}^\infty \frac{1}{k!}x^k = 1 + x + \frac{x^2}{2!} + \dots \]What do you think, how much memory INT takes?
Can it be depending on the platform:
Cpython open source realization:
struct _longobject {
// macros with
// 1. the object’s reference counter (8 bytes)
// 2. and a pointer to the corresponding type object (8 bytes)
// 3. and extension field ob_size (8 bytes)
PyObject_VAR_HEAD
// int value adds 0, 4 (32x) or 8 bytes (64x)
// SUM(for i=0 through abs(ob_size)-1) ob_digit[i] * 2**(SHIFT*i)
digit ob_digit[1];
};