Skip to main content
deleted 1 character in body
Source Link
nwellnhof
  • 10.6k
  • 1
  • 19
  • 38

Perl 6, 8180 bytes

{map({|(1,3,9,|('A'..'Z'))[grep :k,*%3==$^v,($_,(*+1)div-+^*div 3...0)]},1,2).join.flip}

Try it online!Try it online!

No separator. Based on xnor's answer.

Perl 6, 81 bytes

{map({|(1,3,9,|('A'..'Z'))[grep :k,*%3==$^v,($_,(*+1)div 3...0)]},1,2).join.flip}

Try it online!

No separator. Based on xnor's answer.

Perl 6, 80 bytes

{map({|(1,3,9,|('A'..'Z'))[grep :k,*%3==$^v,($_,-+^*div 3...0)]},1,2).join.flip}

Try it online!

No separator. Based on xnor's answer.

Source Link
nwellnhof
  • 10.6k
  • 1
  • 19
  • 38

Perl 6, 81 bytes

{map({|(1,3,9,|('A'..'Z'))[grep :k,*%3==$^v,($_,(*+1)div 3...0)]},1,2).join.flip}

Try it online!

No separator. Based on xnor's answer.