Thursday, January 16, 2014

Euler : Day 1

So I solved Problem 1 - 5 today. Choice of environment was obvious for me, Python within EPD on Win7.

Interesting observations, after the second problem, I decided to check for execution times, and basic clock stamps satisfy me.  I should try and keep up with the optimisation practises to bring these times down much as possible.

However, an ethical dilemma arises regarding problem 5. I directly did the math in my head to start with a product value for all primes less than 20. It is not wrong, but to have a more generic code, I should leave it to the program to find out the primes and calculate the number. It's not significant for an upper limit of 20, but that will definitely change as this limit goes up.
Presently, Execution time is 0.06 ms, and can't say I am unhappy with that.

Oh yes, I am trying not to use any libraries, to keep stuff minimalistic, for as long as I can. Let's see how long I can keep that up.  So Long.

No comments:

Post a Comment