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|Perl6Perl 6}}==
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 .. *)[^1525];</lang>
 
=={{header|Python}}==
1,934

edits