Anonymous user
Narcissistic decimal number: Difference between revisions
→{{header|Perl 6}}: Output?
(→{{header|Perl 6}}: oops, misunderstood the task description) |
(→{{header|Perl 6}}: Output?) |
||
Line 7:
=={{header|Perl 6}}==
{{output?}}
Here is a straightforward, naive implementation. Should work but takes ages.
<lang perl6>sub is-narcissic(Int $n) { $n == [+] $n.comb »**» $n.chars }
|