Perfect numbers: Difference between revisions
Content added Content deleted
(Updated second D entry) |
|||
Line 490: | Line 490: | ||
<lang d>import std.stdio, std.algorithm, std.range; |
<lang d>import std.stdio, std.algorithm, std.range; |
||
bool isPerfect(in |
bool isPerfect(in uint n) pure nothrow |
||
in { |
|||
⚫ | |||
assert(n > 0); |
|||
} body { |
|||
⚫ | |||
} |
} |
||
void main() { |
void main() { |
||
iota( |
iota(1, 10_000).filter!isPerfect.writeln; |
||
}</lang> |
}</lang> |
||