Vampire number: Difference between revisions
m
→{{header|RPL}}: tweaked the code
(added RPL) |
m (→{{header|RPL}}: tweaked the code) |
||
Line 3,402:
DUP « →STR » MAP ∑LIST STR→ <span style="color:blue">DIGCNT</span> digc ≠ '''THEN''' DROP '''END'''
DUP 2 GET 'divs' STO+
'result' STO+
'''END'''
Line 3,413 ⟶ 3,412:
1 PICK3 SIZE '''FOR''' j
" = " +
OVER j GET
"*" + OVER j
2 '''
'''ELSE''' DROP2 "Not vampiric" '''END'''
» '<span style="color:blue">V→STR</span>' STO <span style="color:grey">@ ''( { (d1,d2) } n → "n = d1*d2" )''</span>
|