Jump to content

Numbers with same digit set in base 10 and base 16: Difference between revisions

Line 938:
=={{header|langur}}==
{{trans|Python}}
<syntaxhighlight lang="langur">val# .makesetusing =hash fnkeys .n:to sortcreate for[=[]]a .c in split(.n) { if .c not in _for: _for ~= [.c] }pseudo-set
val .makeset = fn .n: foldfrom fn(.h, .v) { .h ~ {.v: 0} }, {:}, split .n
 
var .col = 1
for .n in 0 .. 99999 {
if .makeset(.n) == .makeset("{{string .n:X}}", 16) {
write "{{.n:7}}"
if .col div 10: writeln()
1,007

edits

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