Skip to main content
deleted 422 characters in body
Source Link
david
  • 609
  • 4
  • 13

Python 3, 52 47 bytes

thanks to @BMO

f=lambda n,i=1:len({*str(n**i)})>9or 1+f(n,i+1)

Try it online!

Python 3, 52 bytes

lambda n,i=1:len({*str(n**i)})==10 and i or f(n,i+1)

[Try it online!][TIO-jpwkyhgo]

[TIO-jpwkyhgo]: https://tio.run/##JYsxDsIwDEX3nsJsdsjQNEAhUm7CEtQGLBW3ClkQ4uzBEn97@u9t7/pYxbccr21Jz9uUQCxHF5ZZ8GNetaAYw/SlGF0PSSZgWAtkVG3vqGUFBhYoSe4zDhb8SKEDHWd9dhG0C7AVlopstWSirvtzRjf4w/E0ni89UfsB "Python 3 – Try It Online"

Python 3, 47 bytes

thanks to @BMO

f=lambda n,i=1:len({*str(n**i)})>9or 1+f(n,i+1)

Try it online!

Python 3, 52 bytes

lambda n,i=1:len({*str(n**i)})==10 and i or f(n,i+1)

[Try it online!][TIO-jpwkyhgo]

[TIO-jpwkyhgo]: https://tio.run/##JYsxDsIwDEX3nsJsdsjQNEAhUm7CEtQGLBW3ClkQ4uzBEn97@u9t7/pYxbccr21Jz9uUQCxHF5ZZ8GNetaAYw/SlGF0PSSZgWAtkVG3vqGUFBhYoSe4zDhb8SKEDHWd9dhG0C7AVlopstWSirvtzRjf4w/E0ni89UfsB "Python 3 – Try It Online"

Python 3, 52 47 bytes

thanks to @BMO

f=lambda n,i=1:len({*str(n**i)})>9or 1+f(n,i+1)

Try it online!

added 438 characters in body
Source Link
david
  • 609
  • 4
  • 13

Python 3, 5247 bytes

thanks to @BMO

lambdaf=lambda n,i=1:len({*str(n**i)})==10 and i or>9or f1+f(n,i+1)

Try it online!Try it online!

Python 3, 52 bytes

lambda n,i=1:len({*str(n**i)})==10 and i or f(n,i+1)

[Try it online!][TIO-jpwkyhgo]

[TIO-jpwkyhgo]: https://tio.run/##JYsxDsIwDEX3nsJsdsjQNEAhUm7CEtQGLBW3ClkQ4uzBEn97@u9t7/pYxbccr21Jz9uUQCxHF5ZZ8GNetaAYw/SlGF0PSSZgWAtkVG3vqGUFBhYoSe4zDhb8SKEDHWd9dhG0C7AVlopstWSirvtzRjf4w/E0ni89UfsB "Python 3 – Try It Online"

Python 3, 52 bytes

lambda n,i=1:len({*str(n**i)})==10 and i or f(n,i+1)

Try it online!

Python 3, 47 bytes

thanks to @BMO

f=lambda n,i=1:len({*str(n**i)})>9or 1+f(n,i+1)

Try it online!

Python 3, 52 bytes

lambda n,i=1:len({*str(n**i)})==10 and i or f(n,i+1)

[Try it online!][TIO-jpwkyhgo]

[TIO-jpwkyhgo]: https://tio.run/##JYsxDsIwDEX3nsJsdsjQNEAhUm7CEtQGLBW3ClkQ4uzBEn97@u9t7/pYxbccr21Jz9uUQCxHF5ZZ8GNetaAYw/SlGF0PSSZgWAtkVG3vqGUFBhYoSe4zDhb8SKEDHWd9dhG0C7AVlopstWSirvtzRjf4w/E0ni89UfsB "Python 3 – Try It Online"

Source Link
david
  • 609
  • 4
  • 13

Python 3, 52 bytes

lambda n,i=1:len({*str(n**i)})==10 and i or f(n,i+1)

Try it online!