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 Answer

added 64 characters in body
Source Link
AZTECCO
  • 11k
  • 1
  • 17
  • 60

Haskell, 61(削除) 61 (削除ここまで) 56 bytes

f l=foldl1(*)$zipWithf=product.zipWith(^)[x|x<-[2..],all((>0).rem x)[2..x-1]]l1]]

Try it online! Try it online!

  • saved 5 by stealing @Unrelated String advice to @M. Salman Khan answer.

Haskell, 61 bytes

f l=foldl1(*)$zipWith(^)[x|x<-[2..],all((>0).rem x)[2..x-1]]l

Try it online!

Haskell, (削除) 61 (削除ここまで) 56 bytes

f=product.zipWith(^)[x|x<-[2..],all((>0).rem x)[2..x-1]]

Try it online!

  • saved 5 by stealing @Unrelated String advice to @M. Salman Khan answer.
Source Link
AZTECCO
  • 11k
  • 1
  • 17
  • 60

Haskell, 61 bytes

f l=foldl1(*)$zipWith(^)[x|x<-[2..],all((>0).rem x)[2..x-1]]l

Try it online!

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