Narcissistic decimal number: Difference between revisions
m
no edit summary
(Perl 6 entry) |
mNo edit summary |
||
Line 6:
The task is to generate and show here, the first 25 narcissistic numbers.
=={{header|
Here is a straightforward, naive implementation. Should work but takes ages.
<lang perl6>sub is-narcissic(Int $n) { $n == ([+] $n.comb)**$n.chars }
say (grep &is-narcissic, 0 .. *)[^
=={{header|Python}}==
|