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
-1 byte
dingledooper
  • 23.4k
  • 1
  • 40
  • 130

Python 2, 61 bytes

Wilson's theroem FTW!

f=lambda p,a=1,b=1:p==[]or b**(a%b*p[0])*f(p[a%b:],a*b*b,b+1)

Try it online!

Python 2, 62 bytes

f=lambda p,a=1,b=1:p==[]or(a%b<1or b**p.pop(0))*f(p,a*b*b,b+1)

Try it online!

dingledooper
  • 23.4k
  • 1
  • 40
  • 130

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