Friday, May 11, 2012

Project Euler, Problem 5 solution

Problem 5

First of all I wanted refresh my school math knowledge here.
Then I've wrote the optimized program.
And then I read this:

"24 Jul 2004 01:43 am
bitRAKE (Assembler)

This does not require programming at all.
Compute the prime factorization of each number from 1 to 20, and multiply the greatest power of each prime together:
20 = 2^2 * 5
19 = 19
18 = 2 * 3^2
17 = 17
16 = 2^4
15 = 3 * 5
14 = 2 * 7
13 = 13
11 = 11
All others are included in the previous numbers."

So you better type into Linux command shell 'bc' and then 2^4 * 3^2 * 5 * 7 * 11 * 13 * 17 * 19


Congratulations, the answer you gave to problem 5 is correct.
You are the 131586th person to have solved this problem.

No comments:

Post a Comment