Last active
July 15, 2021 09:45
-
-
Save betaprojects/d8a5e52ce73b2e1a17f770df14e52a67 to your computer and use it in GitHub Desktop.
Project Euler & HackerRank problem 63 solution: Find how many n-digit positive integers exist which are also an nth power - solved using Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
k = int(input()) | |
for n in range(1,10): | |
if len(str(pow(n,k)))==k: print (pow(n,k)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment