Flash Flash Revolution: Community Forums (http://www.flashflashrevolution.com/vbz/index.php)
-   Technology (http://www.flashflashrevolution.com/vbz/forumdisplay.php?f=74)
-   -   The Project Euler thread (http://www.flashflashrevolution.com/vbz/showthread.php?t=120818)

 danny53x 10-21-2011 11:48 PM

Re: THE project euler thread

How do I learn this stuff and become a cool programmer like you guys ; _;

 TC_Halogen 10-22-2011 03:16 AM

Re: THE project euler thread

I'm interested in playing this but I have very little coding experience, haha.

 Reincarnate 10-22-2011 02:20 PM

Re: THE project euler thread

Good way to learn imo

 stargroup100 10-23-2011 03:38 AM

Re: THE project euler thread

Quote:
 Originally Posted by danny53x (Post 3555090) How do I learn this stuff and become a cool programmer like you guys ; _;
Project Euler is a set of problems that encourages the use of clever math to simplify programming problems. If you're not inherently good at math, this is gonna be really hard for you no matter how someone teaches you. (Except for the first few problems, which are pretty easy.)

If, on the other hand, you just want to learn programming, this is one way of starting out. At least it gives you a goal.

Man, I need to find more time to do this.

 foilman8805 10-23-2011 03:53 AM

Re: THE project euler thread

Thanks OP for giving me something to do with my brain while I'm in between jobs. This is awesome. I'll be programming in MATLAB/Octave. I just did the first two problems as a bit of a warm up and it was a lot of fun.

Problem 1

Problem 2
Had to first write a function to calculate the numbers in the Fibonacci sequence given any input:

I then implemented that function in the script file below to find the solution:

 foilman8805 10-23-2011 04:11 AM

Re: THE project euler thread

Interesting, I actually had to augment the source code in MATLAB in order to do Problem 3.

For some reason MATLAB arbitrarily sets a limit on prime factoring numbers larger than 2^32. Opened up the factor.m and changed it to 2^50, so this solution pretty much became a one-liner.

Problem 3

 Reincarnate 10-23-2011 11:23 AM

Re: THE project euler thread

hit a wall with this problem :|

 Reshiram 10-23-2011 01:33 PM

Re: THE project euler thread

I'm not gonna use programs. :3

Problem 1:

 stargroup100 10-23-2011 02:04 PM

Re: THE project euler thread

Upon first glance, that problem looks pretty trivial. But since Rubix is having trouble with it, it must be far from that. LOL

I'll take a crack at it.

 stargroup100 10-23-2011 02:18 PM

Re: THE project euler thread

After taking a look at the problem, here's what I have so far. (I'm sure you already figured out this much, it's all the obvious stuff.)

Problem 355:

I'll edit with more content once I figure out more. BRB FOOD LOL

 dag12 10-23-2011 03:27 PM

Re: THE project euler thread

Sounds like you could just write a script for euler's totient function and then run a for loop or something >.>
Though I'm sure there's a more elegant way of doing it.

Also, any way to check answers without registering?

 Reincarnate 10-23-2011 03:28 PM

Re: THE project euler thread

Quote:
 Originally Posted by dag12 (Post 3555944) Sounds like you could just write a script for euler's totient function and then run a for loop or something >.> Though I'm sure there's a more elegant way of doing it. Also, any way to check answers without registering?
tried this :<

and no you have to register

 stargroup100 10-23-2011 04:11 PM

Re: THE project euler thread

UGH

okay this problem is seriously impossible tackling it the way I'm doing it unless there's some beautiful optimization trick

this is not working

 Reincarnate 10-23-2011 04:24 PM

Re: THE project euler thread

getting close but still off

the way I am tackling it is actually very similar to what you posed above (raising primes to powers) but figuring out where to fix things is tricky

 iironiic 10-23-2011 04:38 PM

Re: THE project euler thread

Should 99 be in your sorted mainlist for Co(100)?

I'm thinking about an approach right now, but I haven't come up with anything yet.

 Reincarnate 10-23-2011 04:42 PM

Re: THE project euler thread

Quote:
 Originally Posted by iironiic (Post 3555968) Should 99 be in your sorted mainlist for Co(100)? I'm thinking about an approach right now, but I haven't come up with anything yet.

 Reincarnate 10-23-2011 05:36 PM

Re: THE project euler thread

Hm somehow it's one off, wtf

 LongGone 10-23-2011 05:51 PM

Re: THE project euler thread

Quote:
 Originally Posted by stargroup100 (Post 3555927) Problem 355:

 stargroup100 10-23-2011 05:56 PM

Re: THE project euler thread

 Reincarnate 10-23-2011 06:00 PM

Re: THE project euler thread

can anyone find the problem in my earlier list? should equal 1356, not 1355 (according to the problem description)

All times are GMT -5. The time now is 07:37 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright FlashFlashRevolution