Jump to content

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+
LIST→ DROP R→C
'result' STO+
'''END'''
Line 3,413 ⟶ 3,412:
1 PICK3 SIZE '''FOR''' j
" = " +
OVER j GET RE R→I +
"*" + OVER j GET1 IM+ R→IGET +
2 '''NEXTSTEP''' NIP
'''ELSE''' DROP2 "Not vampiric" '''END'''
» '<span style="color:blue">V→STR</span>' STO <span style="color:grey">@ ''( { (d1,d2) } n → "n = d1*d2" )''</span>
1,151

edits

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