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 28 characters in body
Source Link
ZaMoC
  • 25.5k
  • 2
  • 32
  • 87

Wolfram Language (Mathematica), 6965 bytes

If[#<3,1<2,#<2||!FreeQ[Tr/@(#^#~Check~0&Tr[Check[#^#,1]&/@IntegerDigits[#@#~IntegerDigits~i]~Table~{i,2~Range~#])2,#]]&#}~FreeQ~#&

Try it online! Try it online!

The larger test cases will time out on TIO.-4 bytes from @attinat

Wolfram Language (Mathematica), 69 bytes

If[#<3,1<2,!FreeQ[Tr/@(#^#~Check~0&/@IntegerDigits[#,2~Range~#]),#]]&

Try it online!

The larger test cases will time out on TIO.

Wolfram Language (Mathematica), 65 bytes

#<2||!Tr[Check[#^#,1]&/@#~IntegerDigits~i]~Table~{i,2,#}~FreeQ~#&

Try it online!

-4 bytes from @attinat

added 6 characters in body
Source Link
ZaMoC
  • 25.5k
  • 2
  • 32
  • 87

Wolfram Language (Mathematica), 7069 bytes

If[#<3,1<2,!FreeQ[Tr/@(Check[#^#,0]&#^#~Check~0&/@IntegerDigits[#,2~Range~#]),#]]&

Try it online!

The larger test cases will time out on TIO.
Try it online!

Wolfram Language (Mathematica), 70 bytes

If[#<3,1<2,!FreeQ[Tr/@(Check[#^#,0]&/@IntegerDigits[#,2~Range~#]),#]]&

The larger test cases will time out on TIO.
Try it online!

Wolfram Language (Mathematica), 69 bytes

If[#<3,1<2,!FreeQ[Tr/@(#^#~Check~0&/@IntegerDigits[#,2~Range~#]),#]]&

Try it online!

The larger test cases will time out on TIO.

Source Link
ZaMoC
  • 25.5k
  • 2
  • 32
  • 87

Wolfram Language (Mathematica), 70 bytes

If[#<3,1<2,!FreeQ[Tr/@(Check[#^#,0]&/@IntegerDigits[#,2~Range~#]),#]]&

The larger test cases will time out on TIO.
Try it online!

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