May 14, 2013

Project Euler - Problem 99

So, it's been a long time since I've really posted anything here, but I got the idea to put up some of my old Project Euler videos from my YouTube channel on here.

For those of you unfamiliar with Project Euler, it is... well, let me just quote from their page:

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.

Basically - to rephrase how they describe themselves - it's a lot of problems that combine interesting techniques from mathematics and interesting techniques from computer science.

Now, to the problem itself. Problem 99 is as follows (again, taken from their website):

Comparing two numbers written in index form like \(2^{11}\) and \(3^7\) is not difficult, as any calculator would confirm that \(2^{11}\) = 2048 < 3^7 = 2187$.

However, confirming that \(632382^{518061} > 19432^{525806}\) would be much more difficult, as both numbers contain over three million digits.

Using base_exp.txt (right click and 'Save Link/Target As...'), a 22K text file containing one thousand lines with a base/exponent pair on each line, determine which line number has the greatest numerical value.

NOTE: The first two lines in the file represent the numbers in the example given above.

Now, what you probably came for, the video:

Thanks for reading and watching! :D