Numbers divisible by their individual digits, but not by the product of their digits.: Difference between revisions
Content added Content deleted
Drkameleon (talk | contribs) (Added Arturo implementation) |
Alpha bravo (talk | contribs) (Added AutoHotkey) |
||
Line 370: | Line 370: | ||
<pre>22 33 44 48 55 66 77 88 99 122 124 126 155 162 168 184 222 244 248 264 288 324 333 336 366 396 412 424 444 448 488 515 555 636 648 666 728 777 784 824 848 864 888 936 999</pre> |
<pre>22 33 44 48 55 66 77 88 99 122 124 126 155 162 168 184 222 244 248 264 288 324 333 336 366 396 412 424 444 448 488 515 555 636 648 666 728 777 784 824 848 864 888 936 999</pre> |
||
=={{header|AutoHotkey}}== |
|||
Requires [https://www.autohotkey.com/boards/viewtopic.php?t=6517 Gdip Library] |
|||
<lang AutoHotkey>main: |
|||
while n < 1000 |
|||
{ |
|||
n := A_Index |
|||
prod = 1 |
|||
for i, v in StrSplit(n) |
|||
{ |
|||
if (v = 0) || (n/v <> floor(n/v)) |
|||
continue, main |
|||
prod *= v |
|||
} |
|||
if (n/prod = floor(n/prod)) |
|||
continue |
|||
result .= n "`t" |
|||
} |
|||
MsgBox % result |
|||
</lang> |
|||
{{out}} |
|||
<pre>22 33 44 48 55 66 77 88 99 122 124 126 |
|||
155 162 168 184 222 244 248 264 288 324 333 336 |
|||
366 396 412 424 444 448 488 515 555 636 648 666 |
|||
728 777 784 824 848 864 888 936 999 </pre> |
|||
=={{header|AWK}}== |
=={{header|AWK}}== |