Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

2 of 4
added 410 characters in body
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293

Jelly, 4 bytes

œ?ØC

A monadic Link accepting an integer which yields a list of 42 characters.

The input range may be up to somewhat more than \$-2^{168} \leq n \lt 2^{168}\$ since \42ドル!>2^{168}\$.

Try it online!

How?

œ?ØC - Link: integer, n
 ØC - consonants (Jelly's longest built-in character list containing no digits
 - or hyphen) = "BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz"
œ? - permutation at index (n) if all 42! permutations were written out
 - in lexicographical order.
 - This indexing is modular so when n = -x we fetch the (42!-x)th entry.
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293

AltStyle によって変換されたページ (->オリジナル) /