iDevGames Forums
Project Euler - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Community Zone (/forum-4.html)
+--- Forum: Assembly Room (/forum-13.html)
+--- Thread: Project Euler (/thread-10563.html)



Project Euler - sealfin - Mar 13, 2013 11:10 AM

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]


RE: Project Euler - ThemsAllTook - Mar 13, 2013 03:14 PM

(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.


RE: Project Euler - Zorg - Mar 13, 2013 06:17 PM

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).


RE: Project Euler - JustinFic - Mar 13, 2013 11:37 PM

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.


RE: Project Euler - OneSadCookie - Mar 14, 2013 01:42 AM

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



RE: Project Euler - JustinFic - Mar 14, 2013 03:08 AM

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?


RE: Project Euler - sealfin - Mar 14, 2013 05:15 AM

(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


RE: Project Euler - OneSadCookie - Mar 14, 2013 04:26 PM

The first rule of these problems is definitely, get a bignum library, or a language with one built in...


RE: Project Euler - Zorg - Mar 14, 2013 05:53 PM

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.


RE: Project Euler - OneSadCookie - Mar 15, 2013 02:31 PM

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/12009799/exponentiation-in-ruby-1-8-7-returns-wrong-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



RE: Project Euler - sealfin - Mar 23, 2013 05:08 PM

So, that's Level 1 and this year's target hit Blink LOL


RE: Project Euler - OneSadCookie - Mar 23, 2013 11:50 PM

grats Smile