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

3 of 3
deleted 2 characters in body

Husk, 11 bytes

I got ninja'd..

§&tΛo€Ṗd1dp

Try it online!

Outputs truthy for a lobster number and falsy otherwise. This would be shorter if all returned 0 for empty lists.

Explanation

§&tΛo€Ṗd1dp
 p prime factorization of the input
§ fork:
 t is the list not composed of a single element?
 & and,
 Λo d are all the prime factors' digits
 € present in
 Ṗd1 the powerset of the input's digits?
Razetime
  • 27.6k
  • 3
  • 31
  • 77

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