So I wont be taking partProject 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.
One for Dust.
Moderator: Dust
- MindyMcfly
- Die-Harder
- Posts: 4283
- Joined: 17 Dec 2007 19:47
- Location: Nottingham, Midlands - Go Robin Hood!
- Contact:
One for Dust.
http://projecteuler.net/
----------------------------------------
GM of Real-Life™
(\__/)
(='.'=)
(")_(")
GM of Real-Life™
(\__/)
(='.'=)
(")_(")
- Tiel
- Die-hard
- Posts: 2154
- Joined: 01 Jan 1970 01:00
- Location: Utrecht, Netherlands
- Contact:
Re: One for Dust.
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.
<?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.
- Dust
- The Boss
- Posts: 9093
- Joined: 01 Jan 1970 01:00
- Contact:
Re: One for Dust.
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.
- MindyMcfly
- Die-Harder
- Posts: 4283
- Joined: 17 Dec 2007 19:47
- Location: Nottingham, Midlands - Go Robin Hood!
- Contact:
Re: One for Dust.
You pair will be in nerd heaven
back to my "hello world" tutorial....
back to my "hello world" tutorial....
----------------------------------------
GM of Real-Life™
(\__/)
(='.'=)
(")_(")
GM of Real-Life™
(\__/)
(='.'=)
(")_(")
- Tiel
- Die-hard
- Posts: 2154
- Joined: 01 Jan 1970 01:00
- Location: Utrecht, Netherlands
- Contact:
Re: One for Dust.
Finished the first 10!
Although I had to google some algorythms, since my CPU started melting at brute forcing question 5
Although I had to google some algorythms, since my CPU started melting at brute forcing question 5
- Tiel
- Die-hard
- Posts: 2154
- Joined: 01 Jan 1970 01:00
- Location: Utrecht, Netherlands
- Contact:
Re: One for Dust.
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..
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..
- Dust
- The Boss
- Posts: 9093
- Joined: 01 Jan 1970 01:00
- Contact:
Re: One for Dust.
10715086071862673209484250490600018105614048117055336074437503883703\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..
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.
- Tiel
- Die-hard
- Posts: 2154
- Joined: 01 Jan 1970 01:00
- Location: Utrecht, Netherlands
- Contact:
Re: One for Dust.
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.
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.
-
- Die-hard
- Posts: 1096
- Joined: 01 Jan 1970 01:00
- Location: Bavaria
- Contact:
Re: One for Dust.
My friend key: 94300168313700_fba415b60c0ffe1efe9112a569019482
- Dust
- The Boss
- Posts: 9093
- Joined: 01 Jan 1970 01:00
- Contact:
Re: One for Dust.
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 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.
-
- Die-hard
- Posts: 1096
- Joined: 01 Jan 1970 01:00
- Location: Bavaria
- Contact:
Re: One for Dust.
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.
I like the forum pages. Some of the solutions are just insane.
- Tiel
- Die-hard
- Posts: 2154
- Joined: 01 Jan 1970 01:00
- Location: Utrecht, Netherlands
- Contact:
Re: One for Dust.
13277876310918_0d29977dcbab0fd04c3670550044c225
Who is online
Users browsing this forum: No registered users and 82 guests