iDevGames Forums

Full Version: Project Euler
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm just curious whether anybody here has participated in Project Euler? If you have, have you ever referenced Project Euler when applying for jobs or to schools/colleges/universities/things of that ilk?

I learned of Project Euler in December, and started solving problems a fortnight or so ago to try to achieve Level 1 by the end of the year (I have a... rather low opinion of my mathematical ability Cry)

[Image: sealfin.png]
(Mar 13, 2013 11:10 AM)sealfin Wrote: [ -> ]If you have, have you ever referenced Project Euler when applying for jobs or to schools/colleges/universities/things of that ilk?

Haven't played with it myself, but I participated in an interview (as an interviewer) at a previous job where a coworker of mine brought up a problem from Project Euler to test our interviewee. Can't hurt to have that skillset under your belt.
I've looked at the website and solved some of the problems for fun. I never registered an account or anything like that though. How do you achieve Level 1? By solving a certain number of problems? (Don't have that much experience with job applying, so not quite applicable question for me).
This looks fun as hell! I immediately registered an account.

Quote: How do you achieve Level 1? By solving a certain number of problems?

Looks like you level up for every 25 problems you solve. Once you solve a problem you can access a thread about it and discuss the solution with other people. It seems like a reeeeally cool little rabbit hole.
I'd not heard of it before today, but I did a few this afternoon.

You can friend me with this code:
Code:
41381076451676_84078668b178211e4cb7a50cd421c73a
Here's mine:

Code:
34660844451874_25e3b03bbbb49c27f0b2c946d8232a73

This is bad. This is really, really bad. I'm 10 problems in and my eyes are bleary. I haven't done anything else since the post I made above. I'm trying to make myself stop but I peeked at #11 and I know how to do it. It would just take a little while. I could just not sleep and do it real quick.

O gods, what have I done?
(Mar 14, 2013 01:42 AM)OneSadCookie Wrote: [ -> ]You can friend me with this code:

(Mar 14, 2013 03:08 AM)JustinFic Wrote: [ -> ]Here's mine:

Here's mine:

Code:
86013192444836_cbab5ac975cbfe91925b3389af9bd154

(Mar 13, 2013 11:37 PM)JustinFic Wrote: [ -> ]
(Mar 13, 2013 06:17 PM)Zorg Wrote: [ -> ]How do you achieve Level 1? By solving a certain number of problems?
Looks like you level up for every 25 problems you solve.

Yeah, you gain a level every twenty-five problems you solve, the maximum level being fifteen; you're also able to gain awards, eg. solving ten consecutive problems gains you the "Decathlete" award, though the only award I've gained thus far is:

Project Euler Wrote:[Image: baby-steps.png]
Baby Steps: Solve three problems

LOL
The first rule of these problems is definitely, get a bignum library, or a language with one built in...
Haha. I'm surprised you guys haven't heard of it:

Here's my code: 97156062452226_f98c8789267e769bdb1749698506fc21

I think I have a source code file where I solved a few problems a while back.. Going to go find it.
For those of you following along at home, OS X's default Ruby has a horrible bug with the Fixnum->Bignum transition which will give incorrect results for a large range of computations.

So if 19**15 gives you a negative number, this is why:

http://stackoverflow.com/questions/12009...g-answers/

and here's a horrific workaround I found:

Code:
# OS X's ruby has bugs with multiplications which fall into signed ranges of the
# underlying type of Fixnum
# hack around this.

def to_bignum(x)
    # there has to be a better way to do this :|
    0xfffffffffffffffff.coerce(x)[0]
end

def big_pow(a, b)
    a = to_bignum(a)
    r = 1
    b.times do
        r = to_bignum(r) * a
    end
    r
end
So, that's Level 1 and this year's target hit Blink LOL
grats Smile
I'd assume that everybody here is already aware of this, but on the off chance that somebody is not: Project Euler has been (partially) offline since Sunday (15th June) due to a security breach, and it has been reported by Project Euler staff that it is "highly likely" that all email addresses and passwords have been compromised – according to Project Euler staff passwords were salted and hashed... but the salting function has also been compromised.
Well I don't think my password on there is used anywhere else; phewf.
FYI it looks like Project Euler is back. For a while the problems and solutions were there but there was no logging in, so your progress wasn't tracked.

I'll have to dig out the problems I worked on earlier in the year and submit them.
Reference URL's