Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411430 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 20, 2024, 12:28:13 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Project Euler
Pages: [1] 2 3 4
Print
Author Topic: Project Euler  (Read 18160 times)
Dacke
Level 10
*****



View Profile
« on: April 05, 2012, 10:16:49 AM »

Project Euler:
http://projecteuler.net/

Project Euler is a programming challenge website I joined last week.

There are 378 problems right now and a new problem is added every week (the site has been around since 2001). The problems are mostly math inspired but are designed to primarily be programming problems. The problems are always programming language agnostic, making Project Euler a good place learn a new language (Python in my case).

The site gives you good feedback when you solve problems. On your profile page you can find:
  • A graphical overview of problems solved
  • A level, for easy comparison with other Eulerians
  • Achievements for solving (for example) the twelve first fibonacci numbered problems

Levels and achievements may sound a bit silly, but it gives you nice short-term goals:
 



The site also has lots of site-wide statistics, like programming languages used and countries represented. There are also global high score tables. There is one table for fastest solvers of the most recent problems. There are also high score tables for each language.


The very first problem.

It gets even more fun if you have some friends that you can compare your results with, using the site's friend system. So if anyone wants to befriend me, my secret key is:
43274653323669_ef49b4f66232d831765457a0a7aff946

I have solved 47 problems since I joined last week (using Python) and a friend of mine has solved 37 problems (using Go). But the difficulty keeps ramping up in a nice way, so I won't be able to keep that speed up for long. It shouldn't be too hard to catch up with me if you join now!

So is anyone else a member and how many problems have you solved? Smiley


Someone who has solved lots of problems.



High Scores
If you want to be added or removed, just post your key or username here or send me a PM!









« Last Edit: May 18, 2016, 04:18:18 AM by Dacke » Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
JMickle
Level 10
*****



View Profile
« Reply #1 on: April 05, 2012, 10:25:57 AM »

registering and adding you!

70562802326470_68068d991863acaa9c11e8e3a66c645e

i'm using as3 just to get more comfortable in it. and for fun
Logged

Dacke
Level 10
*****



View Profile
« Reply #2 on: April 05, 2012, 10:33:01 AM »

Sweet! I'll be keeping track of your progress Noir
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
brettchalupa
Guest
« Reply #3 on: April 05, 2012, 10:49:15 AM »

At my previous job a coworker recommended this! He said it's great for checking out and getting more familiar with new languages. Heck, I mine as well sign up.  Cheesy

30747604326477_50dc606f89e8f509f821d5cb25637c75

Will follow both of you!
Logged
JMickle
Level 10
*****



View Profile
« Reply #4 on: April 05, 2012, 10:50:00 AM »

god damn this is hard
Logged

andy wolff
Level 10
*****


-------


View Profile
« Reply #5 on: April 05, 2012, 10:55:50 AM »

I solved a problem. This seems like it'll be a good way to spend my time when I feel like just sitting and working on something relatively short


my key: 73445374326472_25e6e4b822f160fb3d59c98316b5bd3f
Logged

Dacke
Level 10
*****



View Profile
« Reply #6 on: April 05, 2012, 11:13:22 AM »

 Hand Shake LeftGrin Hand Shake Right

A hint to get you started:
The modulus operator is your greatest ally; you will need it for most problems. The modulus operator is usually written as % and gives you the remainder of a division.

Using integer division:
7/2 => 3.5 => 3
7%2 => 1
Which is another way of saying: 7 = 2*3 + 1
Or using words: "You can fit 2 into 7 at most 3 times. You get a remainder of 1."

If you get a remainder of 0 the first number is perfectly dividable by the second number:
15/5 = 3
15%5 = 0

Use this to figure out if things are multiples of other numbers:
Code:
if (96%3 == 0) {
   print("96 is a multiple of 3!");
}

edit @JMickle: ActionScript is considered a dialect of ECMAScript, if you want to add the language you are using to your profile Smiley
« Last Edit: April 05, 2012, 05:32:12 PM by Dacke » Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
PompiPompi
Level 10
*****



View Profile WWW
« Reply #7 on: April 05, 2012, 11:15:26 AM »

Oh god, I don't need more problems in my life... Sad
I guess it's good practice for the brain, but I am really tired of these kind of riddles\problems.
I think university made me hate solving made up problems like these, but I guess it's only because I had to study to a lot of nerve wrecking tests. HW at university wern't so horrible and that is where the real problem solving happen(while studying).
I dunno, I know thikning on problems keeps your brain in shape... oh well, another thing to do "when I have time".
Logged

Master of all trades.
Dacke
Level 10
*****



View Profile
« Reply #8 on: April 05, 2012, 11:57:16 AM »

I took the liberty to add a simple high score table to the first post.
If you want to be added or removed, just post your username here or send me a PM Smiley
« Last Edit: April 05, 2012, 12:15:05 PM by Dacke » Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
Moczan
Guest
« Reply #9 on: April 06, 2012, 04:38:21 AM »

My username: Moczan (42482528326686_538054e7ae918bb682f08d00c14fd601), you can add me to high score table!
Logged
Dacke
Level 10
*****



View Profile
« Reply #10 on: April 06, 2012, 05:08:37 AM »

I have added you as a friend and to the high score table  Hand PencilSmiley

Every time I update my friends page you have solved a new problem! Yesterday andywolff was also completing problems like there was no tomorrow. I really enjoy following your progress; it is a wonder to behold Wizard

Andy is using #C and you are listed as using ECMAScript, but what dialect are you using?
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
roboprez
Level 1
*


Got to love them pixels


View Profile WWW
« Reply #11 on: April 06, 2012, 05:57:49 AM »

Wow this is fun.

My key is 72685438326703_d411f3fb8324697e9e261103c7c69d07
Logged

andy wolff
Level 10
*****


-------


View Profile
« Reply #12 on: April 06, 2012, 08:04:32 AM »

Yeah this is really stimulating. I'm determined to do them all in order

My sloppy math is starting to show its inadequacy, though. I need to clean up my act a bit
Logged

TobiasW
Level 8
***


This can only end brilliantly!


View Profile WWW
« Reply #13 on: April 06, 2012, 09:31:11 AM »

Cool, and slightly addictive! (And it seems like a good place to finally learn Python Smiley )

Added all of you. And here we go:
44558537326698_f68298c6f1c117ce070d3126189c0e8f
Logged

mokesmoe
Level 10
*****



View Profile WWW
« Reply #14 on: April 06, 2012, 03:14:50 PM »

I'm gonna try it out.

58523835326853_f96601e470173f0f22a3ac13ead845e0
Logged
Moczan
Guest
« Reply #15 on: April 07, 2012, 01:50:38 AM »

Andy is using #C and you are listed as using ECMAScript, but what dialect are you using?

I've used Action Script 3, mainly because that's what I use daily and have a nice workspace already set up. Also, I solved a lot of similar problems using C and C++ while I was in school, so most of them were really trivial for me.
I will probably set up a Visual Studio C# and solve other problems with it as I always wanted to learn C# and that seems like a perfect opportunity to get familiar with the basic syntax.
Logged
JMickle
Level 10
*****



View Profile
« Reply #16 on: April 07, 2012, 11:23:25 AM »

did it! haha i was completely mind-blocked the other night, using modulus is so obvious now, thinking about it.
Logged

Dialock
Level 0
**


Not dead yet.


View Profile
« Reply #17 on: April 07, 2012, 10:15:18 PM »

Thanks man, I really appreciate this site you recommended.  Math is not my strong suit, but improving my programming skills to make something else do the work is great.
Logged

@CWIPRE
imaginationac
Level 2
**


Makin' games instead of makin' money.


View Profile WWW
« Reply #18 on: April 08, 2012, 11:12:10 AM »

The site seems to be having major MySQL issues at the moment Sad
Logged

Youtube channel | Charger! Dev Log
              
Dacke
Level 10
*****



View Profile
« Reply #19 on: April 08, 2012, 01:49:36 PM »

I'm really glad this is catching on!

Good job JMickle, I knew you could do it Wizard

Dialock, that's why I love programming! I have added you to the high score table Grin

imaginationac, apparently the site has had some trouble keeping up with all the traffic on Sundays (when new problems are added). They are working on upgrading their servers, but at least they are back online again now.

Personally I have been working on a small python "library" with practical functions and classes that are not part of Python. I'm just adding random stuff as I go along, but so far I have functionality for:
Code: (euler.py)
multiply(listOfNumbers)

Permutations(listOfElements/string) {next(), hasNext()}
//generating permutations one at a time, rather than all at once

BooleanPermutations(listSize) {next(), hasNext()}
//for listSize=2, it returns: [False, False], [False, True], [True, False], [True, True]

uniqueItems(listOfItems/string)

arePermutationsOfEachother(list1/string1, list2/string2)

reversed(integer)

isPalindrome(integer)

digitSum(integer)

binomialCoefficient(n, k)

PrimeSieve(limit) {isPrime(integer), getPrimeList()}

primeFactorization(integer)

greatestCommonDevisor(integer1, integer2)

leastCommonDenominator(integer1, integer2)

(The actual names in the library are a bit shorter though)
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
Pages: [1] 2 3 4
Print
Jump to:  

Theme orange-lt created by panic