Skip to content

Instantly share code, notes, and snippets.

@israelem
Created August 3, 2017 22:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save israelem/ca0590c6e726d4c715a65f1ef69b8696 to your computer and use it in GitHub Desktop.
Save israelem/ca0590c6e726d4c715a65f1ef69b8696 to your computer and use it in GitHub Desktop.
Listar todos los números que sean potencia de tres entre los 1000 primeros números
"""
Listar todos los números que sean potencia de tres entre los 1000 primeros números
"""
list(filter(lambda x: math.log(x, 3) == int(math.log(x, 3)), range(1, 1000)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment