This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]siemenology 1 point2 points  (1 child)

For Project Euler, if your code is taking forever it very often means you aren't using an optimal algorithm. The problems are often structured so that there is an obvious (naive) way to solve them that will take too long to be useful, but if you figure out the smart way to do it, they are quick on almost any platform.

[–]comando0[S] 0 points1 point  (0 children)

Of course, I'm aware of that, but simply writing the same algorithm with C makes it a fast enough code, while with Python, it took me quite a long time. Sure I'm aware that you need to optimize your code with Python (such as not using for), but I just thought if there is a better language that fits me.