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

deleted 2 characters in body
Source Link

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?

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?

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?
added 30 characters in body
Source Link
Razetime
  • 27.6k
  • 3
  • 31
  • 77

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?

Husk, 11 bytes

§&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?

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?
Source Link
Razetime
  • 27.6k
  • 3
  • 31
  • 77

Husk, 11 bytes

§&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?

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