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 2
added 624 characters in body
Unrelated String
  • 23.9k
  • 3
  • 37
  • 61

Brachylog, 13 bytes

wm&l×ばつ

Try it online!

Function submission which dumps some garbage to STDOUT since it saves a byte over l~l&l×ばつ or ∧ċ&l×ばつ.

wm Create a list of unbound variables with the same length as the input.
 (This also prints each element, but that's besides the point.)
 <1 This list is strictly increasing,
 ṗm and each of its elements is prime.
 ≜ Assign a value to each element.
 ;?z^m Raise each prime to the power of the corresponding element of the input,
 ×ばつ and output the product of the powers.

Without the , it completely breaks given exponents of zero--I suppose because they are mathematically eliminated from the final product?

Unrelated String
  • 23.9k
  • 3
  • 37
  • 61

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