( Nyosigomboc | 2020. 02. 28., p – 18:48 )

>>> sum(range(1, pow(10, 9)))
499999999500000000
>>> import numpy
>>> numpy.sum(numpy.arange(1, 10**9, dtype=numpy.int64))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
numpy.core._exceptions.MemoryError: Unable to allocate array with shape (999999999,) and data type int64

Ezzel meg az a baj, hogy mire a vilag minden memoriajat lefoglalna, addigra a masik vegez. (otthoni gepemen lefut, abban tobb RAM van, de azert ez megsem a legjobb megoldas.. erzesre nem lett gyorsabb, csak most mar memoriabol is sokat foglal)