Numbers with same digit set in base 10 and base 16: Difference between revisions
Content deleted Content added
Langurmonkey (talk | contribs) |
Langurmonkey (talk | contribs) |
||
Line 938: | Line 938: | ||
=={{header|langur}}== |
=={{header|langur}}== |
||
{{trans|Python}} |
{{trans|Python}} |
||
<syntaxhighlight lang="langur"> |
<syntaxhighlight lang="langur"># using hash keys to create a pseudo-set |
||
val .makeset = fn .n: foldfrom fn(.h, .v) { .h ~ {.v: 0} }, {:}, split .n |
|||
var .col = 1 |
var .col = 1 |
||
for .n in 0 .. 99999 { |
for .n in 0 .. 99999 { |
||
if .makeset(.n) == .makeset( |
if .makeset(.n) == .makeset(string .n, 16) { |
||
write "{{.n:7}}" |
write "{{.n:7}}" |
||
if .col div 10: writeln() |
if .col div 10: writeln() |