Anonymous user
Proper divisors: Difference between revisions
m
→{{header|Ceylon}}
Walterpachl (talk | contribs) m (typo) |
|||
Line 256:
value end = 20k;
value mostDivisors = (start..end)
//
.map((Integer element) => element->divisors(element).size)
// group based on the number of divisors
Line 263:
.mapItems((Integer key, [<Integer->Integer>+] item) => item*.key)
// find the group with the most divisors
.max(byKey(byIncreasing(Integer
print("the number(s) with the most divisors between ``start`` and ``end`` is/are:
|