Login

Welcome, Guest. Please login or register.

April 23, 2024, 10:31:00 pm

Author Topic: Project Euler  (Read 3789 times)  Share 

0 Members and 1 Guest are viewing this topic.

Mao

  • CH41RMN
  • Honorary Moderator
  • Great Wonder of ATAR Notes
  • *******
  • Posts: 9181
  • Respect: +390
  • School: Kambrya College
  • School Grad Year: 2008
Project Euler
« on: December 27, 2007, 02:10:22 pm »
0
i finally worked out how to register #project_euler (irc.vilalgeirc.net/project_euler) as ahmad suggested ;D

Project Euler is great, really challenging maths/programming stuff
About Project Euler

EDIT: questions answered

;D ;D ;D ;D
« Last Edit: December 31, 2007, 08:12:46 pm by Obsolete Chaos »
Editor for ATARNotes Chemistry study guides.

VCE 2008 | Monash BSc (Chem., Appl. Math.) 2009-2011 | UoM BScHon (Chem.) 2012 | UoM PhD (Chem.) 2013-2015

Collin Li

  • VCE Tutor
  • Victorian
  • ATAR Notes Legend
  • *******
  • Posts: 4957
  • Respect: +17
Re: Project Euler IRC
« Reply #1 on: December 27, 2007, 03:53:48 pm »
0
Does anyone have a link to a problem site where I don't need to use computer code? I don't like this computer code thing because I don't know where maths ends and when computer starts.

Daniel15

  • is awesome
  • Victorian
  • Forum Leader
  • ****
  • Posts: 600
  • Maintainer of the ATAR Calculator
  • Respect: +28
Re: Project Euler IRC
« Reply #2 on: December 29, 2007, 05:44:40 pm »
0
Quote
since the channel's registered under my name, when i'm not logged on would anyone else be able to use it?
Yes, they will be able to use it. Just you'll have a channel with no active Ops (unless you add more Ops)

Speaking of Project Euler, I've done probably the easiest ones (1, 16, 20, 36, and 48 :P), got stuck on some of the others :P
Estimate your ATAR (ENTER)! VCE ATAR Calculator

2005: Cisco CCNA Units 1+2
2006: Info Systems [39 → 36.93]
2007: Specialist [33 → 43.13], Methods [39 → 44.48], Physics [34 → 37.38], English [23 → 19.91], Chem [26]
ENTER: 84.95

2008-2011: Professional Software Development, Swinburne Uni.

cara.mel

  • Guest
Re: Project Euler IRC
« Reply #3 on: December 29, 2007, 06:04:58 pm »
0
I don't know how to do 36 and 48 :(
I've done 1-10, 12-14, 16, 17, 19, 20, 25 and I can't work out how to do any more 8)
Learning something other than vb is apparently the way to go :o

Mao

  • CH41RMN
  • Honorary Moderator
  • Great Wonder of ATAR Notes
  • *******
  • Posts: 9181
  • Respect: +390
  • School: Kambrya College
  • School Grad Year: 2008
Re: Project Euler IRC
« Reply #4 on: December 29, 2007, 06:43:55 pm »
0
no, VB is good, it's sooo easy
i havent even looked at 30 yet.... probably should do that 2night... :P
Editor for ATARNotes Chemistry study guides.

VCE 2008 | Monash BSc (Chem., Appl. Math.) 2009-2011 | UoM BScHon (Chem.) 2012 | UoM PhD (Chem.) 2013-2015

Daniel15

  • is awesome
  • Victorian
  • Forum Leader
  • ****
  • Posts: 600
  • Maintainer of the ATAR Calculator
  • Respect: +28
Re: Project Euler IRC
« Reply #5 on: December 29, 2007, 06:50:47 pm »
0
Quote
Learning something other than vb is apparently the way to go
Yeah, I don't think VB can handle numbers that big. Most programming languages can't handle really really big numbers, at least not in-built (usually they use some sort of arbitrary precision functions).
I used PHP with the BCMath Library (this is one of the "extensions" it comes with).

I'm not going to post an answer exactly, but for question 48:
Quote
The series, 11 + 22 + 33 + ... + 1010 = 10405071317.

Find the last ten digits of the series, 11 + 22 + 33 + ... + 10001000.

As a simple solution (that works :P), you'd have something like:

total = 0
loop through each value from 1 to 1000
   ⇒ add xx to the total

output the last 10 digits of total

I'm sure there's some algorithm for this, but I always opt for the simple simple methods.
:)
Estimate your ATAR (ENTER)! VCE ATAR Calculator

2005: Cisco CCNA Units 1+2
2006: Info Systems [39 → 36.93]
2007: Specialist [33 → 43.13], Methods [39 → 44.48], Physics [34 → 37.38], English [23 → 19.91], Chem [26]
ENTER: 84.95

2008-2011: Professional Software Development, Swinburne Uni.

cara.mel

  • Guest
Re: Project Euler IRC
« Reply #6 on: December 29, 2007, 06:54:36 pm »
0
yeah but that answer will have more than 16 digits in it which kills vb. XD

I'm becoming a pro at the for... next loop 8)

Daniel15

  • is awesome
  • Victorian
  • Forum Leader
  • ****
  • Posts: 600
  • Maintainer of the ATAR Calculator
  • Respect: +28
Re: Project Euler IRC
« Reply #7 on: December 29, 2007, 08:15:00 pm »
0
Quote
yeah but that answer will have more than 16 digits in it which kills vb. XD
Yeah, you'll need some arbitrary precision maths library (something like BCMath for PHP).
Estimate your ATAR (ENTER)! VCE ATAR Calculator

2005: Cisco CCNA Units 1+2
2006: Info Systems [39 → 36.93]
2007: Specialist [33 → 43.13], Methods [39 → 44.48], Physics [34 → 37.38], English [23 → 19.91], Chem [26]
ENTER: 84.95

2008-2011: Professional Software Development, Swinburne Uni.

reg

  • Guest
Re: Project Euler IRC
« Reply #8 on: December 29, 2007, 09:52:40 pm »
0
java.math.BigIntege... oh wait.

These challenges are a great way to pick up a new language =P.

Mao

  • CH41RMN
  • Honorary Moderator
  • Great Wonder of ATAR Notes
  • *******
  • Posts: 9181
  • Respect: +390
  • School: Kambrya College
  • School Grad Year: 2008
Re: Project Euler IRC
« Reply #9 on: December 29, 2007, 10:32:18 pm »
0
lol guys, this is where i jump out and yell at the top of my lungs "cheating"

c'mon, create your own arbitrary-length string calculator!!! dnt be lazy like *some* of us.... :P
Editor for ATARNotes Chemistry study guides.

VCE 2008 | Monash BSc (Chem., Appl. Math.) 2009-2011 | UoM BScHon (Chem.) 2012 | UoM PhD (Chem.) 2013-2015

reg

  • Guest
Re: Project Euler IRC
« Reply #10 on: December 29, 2007, 10:47:42 pm »
0
Because using provided API is a crutch AMIRITE?!?

But yah on some of these challenges, like ones involving 1000 digits, I just say fuck it and use Java lol.

/0

  • Victorian
  • ATAR Notes Legend
  • *******
  • Posts: 4124
  • Respect: +45
Re: Project Euler IRC
« Reply #11 on: December 30, 2007, 03:15:26 am »
0
Lol I only know how to program my calculator... and it's not that fast... I've done 8 so far, and I don't think I can do many more.

So far I think you can solve 1, 3, 5, 6, 15 without programming

I think you can even solve 85 without programming,


It's equivalent to m(m+1)n(n+1)/4=2000000 and finding the closest value to 2000000 for integer m and n.
« Last Edit: December 30, 2007, 03:26:58 am by DivideBy0 »

Answer28

  • Victorian
  • Fresh Poster
  • *
  • Posts: 4
  • Respect: 0
Re: Project Euler IRC
« Reply #12 on: December 30, 2007, 04:09:31 am »
0
I have to thank Ahmad for introducing me to ProjectEuler, my programming skills have sky-rocketed because of it!
For problem48 a big hint:

when calculating big things like 99^99 and then adding it to 100^100 , you will face problems. All the question is asking for is for the last 10 digits.
I really dont want to give it away. Coblin this is where the programming part stops, and the math part starts. Can someone also tell me how to do spoilers so only people that want to read it can?

Daniel15

  • is awesome
  • Victorian
  • Forum Leader
  • ****
  • Posts: 600
  • Maintainer of the ATAR Calculator
  • Respect: +28
Re: Project Euler IRC
« Reply #13 on: December 30, 2007, 01:52:28 pm »
0
Quote
c'mon, create your own arbitrary-length string calculator!!!
I did one in Visual Basic once... I think I've lost the code, though. It was years ago :P

Quote
All the question is asking for is for the last 10 digits.
I really dont want to give it away. Coblin this is where the programming part stops, and the math part starts.
Haha, I'm usually all programming, and no maths. So I can do the ones that are easy from a programming viewpoint, but any ones involving complex maths will take me ages. I'm really not a smart person  :idiot2:
I'm really bad with stuff like this so take the stupid yet simple approach :P

Quote
Can someone also tell me how to do spoilers so only people that want to read it can?
On this forum? There's no spoiler tags at the moment. I could add it if you like?
Estimate your ATAR (ENTER)! VCE ATAR Calculator

2005: Cisco CCNA Units 1+2
2006: Info Systems [39 → 36.93]
2007: Specialist [33 → 43.13], Methods [39 → 44.48], Physics [34 → 37.38], English [23 → 19.91], Chem [26]
ENTER: 84.95

2008-2011: Professional Software Development, Swinburne Uni.

cara.mel

  • Guest
Re: Project Euler IRC
« Reply #14 on: December 30, 2007, 01:58:29 pm »
0
You guys are going to be disappointed. doing 96 by hand. 4% of way there. xD