Advertisemen
I've always had a hatred for Python, slow with horrible syntax.
However, I've just found an advantage. One of Project Euler's problems is to find the last ten digits of:
The other day I read about had Python handles integers, it can handle integers using as much memory as your computer has without requiring any external libraries (which C and C++ does, they only have in-built support for 64 bit integers which isn't enough).
So I opened Python's command line interface and typed the following:
mso 9]>
Problem solved, quickly as well!
So I guess Python does have it's benefits.
>>> a=0
>>> for i in range(1,1001):
... a=a+pow(i,i)
...
>>> print(a)
Problem solved, quickly as well!
So I guess Python does have it's benefits.
Advertisemen
Tidak ada komentar:
Posting Komentar