Project Euler: math + programming = fun puzzles! | INFJ Forum

Project Euler: math + programming = fun puzzles!

corvidae

ohai internets
Donor
Dec 23, 2008
806
55
0
MBTI
INTJ
Enneagram
?
Although I think many INFJs will beg to differ with my title, I find the programming puzzles on projecteuler.net to be addicting. The interesting thing is that although it's possible to solve most puzzles by brute force (i.e., plug in every single number until one works), the philosophy is that you ought to create a program that will calculate in under a minute, and often, under a second.

For example, one problem was to find the last 10 digits of the expression:
Code:
1^1 + 2^2 + 3 ^3 + 4^4 ... + 999^999 + 1000^1000

You could theoretically just add all 1000 terms and find the last 10 digits then, but most programming languages do not calculate numbers anywhere near the size of 1000^1000. And it's more fun to be creative =)
 
write a program to find the pattern in the last 10 digits, then sequence it till the numbers would be 1000 (its 2 am, you get what I mean).
 
I have been member for a few years. How many have you completed?
 
Only 19, I'm still new to using Scheme.
 
I have never liked Lisp. I started doing mine in C++ then decided to switch to Perl to do the problems because it was a lot easier to add arbitrary numbers to it and also didn't have to mess with type conversions.

I'm not that much further. I've completed 25 of them. I haven't worked on them in quite some time. I'm sure I would have many more if I were determined. Heh.
 
perl sounds like exactly the kind of language that would work for Project Euler. It's messy, it's hackish, but it works.

I wonder what poor guy is doing everything in VB.NET...
 
I'm very much a proponent of Perl. I think it is by far the best language for a first language. Not really that useful for making fancy stuff but when you just need to do stuff like complex math problems or manipulate text, it's perfect.
 
Last edited:
perl sounds like exactly the kind of language that would work for Project Euler. It's messy, it's hackish, but it works.

I wonder what poor guy is doing everything in VB.NET...
If I were to try any, I probably would be that poor guy, seeing as I only know QBASIC and Visual BASIC. But I'm not a programmer, and I don't aspire to be one, so I'm not too worried about it.
 
Don't worry about free books, that's what bittorrent is for ;D
 
Last edited: