16 lines
284 B
Text
16 lines
284 B
Text
for n = 1 to 10
|
|
println["$n\t" + join[" ", properDivisors[n]]]
|
|
|
|
println[]
|
|
|
|
d = new dict
|
|
for n = 1 to 20000
|
|
{
|
|
c = length[properDivisors[n]]
|
|
d.addToList[c, n]
|
|
}
|
|
|
|
most = max[keys[d]]
|
|
println[d@most + " have $most factors"]
|
|
|
|
properDivisors[n] := allFactors[n, true, false, true]
|