giovedì 23 maggio 2013

Problema di Eulero 5


Ebbene si', qui ho barato nel senso che, visto che impiegavo meno tempo a farlo con carta e penna che con il calcolatore, non ho scritto nessun programma.

La formulazione del quinto problema di Eulero e' la seguente
-----------------------------------------------

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?
-----------------------------------------------
in pratica basta scrivere
1=1
2=2
3=3
4=2x2
5=5
6=3x2
7=7
8=2x2x2
9=3x3
10=2x5
11=11
12=2x2x3
13=13
14=2x7
15=3x5
16=2x2x2x2
17=17
18=2x3x3
19=19
20=2x2x5

il risultato atteso e' dato da (2x2x2x2)x(3x3)x5x7x11x13x17x19

La soluzione e' 232792560

Nessun commento:

Posta un commento

Perche' investire su Unix

 Un libro trovato nel libero scambio alla Coop su cio' che poteva essere e non e' stato...interessante la storia su Unix del primo c...