One for Dust.

Here you can talk about everything that's offtopic.

Moderator: Dust

Post Reply
User avatar
MindyMcfly
Die-Harder
Posts: 4283
Joined: 17 Dec 2007 19:47
Location: Nottingham, Midlands - Go Robin Hood!
Contact:

One for Dust.

Post by MindyMcfly » 16 Feb 2012 12:06

http://projecteuler.net/
Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.
So I wont be taking part :lol:
----------------------------------------

GM of Real-Life™

(\__/)
(='.'=)
(")_(")
User avatar
Tiel
Die-hard
Posts: 2154
Joined: 01 Jan 1970 01:00
Location: Utrecht, Netherlands
Contact:

Re: One for Dust.

Post by Tiel » 16 Feb 2012 14:02

For example, the first puzzle can be solved using PHP like this:
<?php
for ($i=1; $i<1000; $i++) {
if ($i % 5 == 0 || $i % 3 == 0) {
$total += $i;
}
}
echo $total;
?>

So far quite easy, but I'm seeing some very hard problems.
User avatar
Dust
The Boss
Posts: 9093
Joined: 01 Jan 1970 01:00
Contact:

Re: One for Dust.

Post by Dust » 16 Feb 2012 14:31

I solved a few of those some years ago, but it got very hard very fast :)
I do what I think is right. But I don't think that what I think is right can not be wrong.
User avatar
MindyMcfly
Die-Harder
Posts: 4283
Joined: 17 Dec 2007 19:47
Location: Nottingham, Midlands - Go Robin Hood!
Contact:

Re: One for Dust.

Post by MindyMcfly » 16 Feb 2012 15:05

You pair will be in nerd heaven :lol:

back to my "hello world" tutorial.... :cry:
----------------------------------------

GM of Real-Life™

(\__/)
(='.'=)
(")_(")
User avatar
Tiel
Die-hard
Posts: 2154
Joined: 01 Jan 1970 01:00
Location: Utrecht, Netherlands
Contact:

Re: One for Dust.

Post by Tiel » 16 Feb 2012 16:05

Finished the first 10!
Although I had to google some algorythms, since my CPU started melting at brute forcing question 5 :)
User avatar
Tiel
Die-hard
Posts: 2154
Joined: 01 Jan 1970 01:00
Location: Utrecht, Netherlands
Contact:

Re: One for Dust.

Post by Tiel » 16 Feb 2012 16:11

calculating 2^1000 is also a challenge for the average cpu.
I remember writing a script for that once in Turbo Pascal about 15 years ago, but then it was limited to 256 digits.

I should go back to work..
User avatar
Dust
The Boss
Posts: 9093
Joined: 01 Jan 1970 01:00
Contact:

Re: One for Dust.

Post by Dust » 16 Feb 2012 16:57

Tiel wrote:calculating 2^1000 is also a challenge for the average cpu.
I remember writing a script for that once in Turbo Pascal about 15 years ago, but then it was limited to 256 digits.

I should go back to work..
10715086071862673209484250490600018105614048117055336074437503883703\
51051124936122493198378815695858127594672917553146825187145285692314\
04359845775746985748039345677748242309854210746050623711418779541821\
53046474983581941267398767559165543946077062914571196477686542167660\
429831652624386837205668069376

Or in binary (you could calculate that in your head):
10000000000000000000000000000000000000000000000000000000000000000000\
00000000000000000000000000000000000000000000000000000000000000000000\
00000000000000000000000000000000000000000000000000000000000000000000\
00000000000000000000000000000000000000000000000000000000000000000000\
00000000000000000000000000000000000000000000000000000000000000000000\
00000000000000000000000000000000000000000000000000000000000000000000\
00000000000000000000000000000000000000000000000000000000000000000000\
00000000000000000000000000000000000000000000000000000000000000000000\
00000000000000000000000000000000000000000000000000000000000000000000\
00000000000000000000000000000000000000000000000000000000000000000000\
00000000000000000000000000000000000000000000000000000000000000000000\
00000000000000000000000000000000000000000000000000000000000000000000\
00000000000000000000000000000000000000000000000000000000000000000000\
00000000000000000000000000000000000000000000000000000000000000000000\
0000000000000000000000000000000000000000000000000

:)
I do what I think is right. But I don't think that what I think is right can not be wrong.
User avatar
Tiel
Die-hard
Posts: 2154
Joined: 01 Jan 1970 01:00
Location: Utrecht, Netherlands
Contact:

Re: One for Dust.

Post by Tiel » 24 Feb 2012 15:15

Finished 17 of em so far :)
I love it, but I seem to be very inefficient all the time. My math skills are far behind. It's not very important for a web developer either.
Jem
Die-hard
Posts: 1096
Joined: 01 Jan 1970 01:00
Location: Bavaria
Contact:

Re: One for Dust.

Post by Jem » 24 Feb 2012 19:40

My friend key: 94300168313700_fba415b60c0ffe1efe9112a569019482
User avatar
Dust
The Boss
Posts: 9093
Joined: 01 Jan 1970 01:00
Contact:

Re: One for Dust.

Post by Dust » 24 Feb 2012 20:34

1730115542957_8ce2c84884abe817225fc9e9c2072ba2

I solved 19 many years ago, but got bored. They are getting harder very fast, and my math skills aren't what they used to be (and even what they used to be is probably not enough ... :)
I do what I think is right. But I don't think that what I think is right can not be wrong.
Jem
Die-hard
Posts: 1096
Joined: 01 Jan 1970 01:00
Location: Bavaria
Contact:

Re: One for Dust.

Post by Jem » 24 Feb 2012 22:23

I think it depends on what language you use. There are some math oriented languages that seem to be born for this kind of stuff.
I like the forum pages. Some of the solutions are just insane.
User avatar
Tiel
Die-hard
Posts: 2154
Joined: 01 Jan 1970 01:00
Location: Utrecht, Netherlands
Contact:

Re: One for Dust.

Post by Tiel » 26 Feb 2012 21:10

13277876310918_0d29977dcbab0fd04c3670550044c225
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests