Proper divisors: Difference between revisions
Content added Content deleted
(Proper divisors in various BASIC dialents) |
|||
Line 2,139: | Line 2,139: | ||
} |
} |
||
} |
} |
||
for i in 1..10 { |
for i in 1..10 { |
||
print("\(i): \(properDivs(i). |
print("\(i): \(properDivs(i).ToArray())") |
||
} |
} |
||
Line 2,147: | Line 2,147: | ||
for i in 1..20000 { |
for i in 1..20000 { |
||
let count = properDivs(i). |
let count = properDivs(i).Length() |
||
if count > max { |
if count > max { |
||
set (num, max) = (i, count) |
set (num, max) = (i, count) |