Jump to content

Narcissistic decimal number: Difference between revisions

add BQN
No edit summary
(add BQN)
Line 644:
 
<pre>0 1 2 3 4 5 6 7 8 9 153 370 371 407 1634 8208 9474 54748 92727 93084 548834 1741725 4210818 9800817 9926315</pre>
 
=={{header|BQN}}==
 
<code>B10</code> is a BQNcrate idiom to get the digits of a number.
 
<lang bqn>B10 ← 10{⌽𝕗|⌊∘÷⟜𝕗⍟(↕1+·⌊𝕗⋆⁼1⌈⊢)}
IsNarc ← {𝕩=+´⋆⟜≠B10 𝕩}
 
/IsNarc ↕150</lang><lang>⟨0 1 2 3 4 5 6 7 8 9 153 370 371 407 1634 8208 9474 54748 92727 93084 548834 1741725 4210818 9800817 9926315⟩</lang>
 
=={{header|C}}==
236

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.