Project Euler #63: Powerful digit counts

  • + 0 comments

    Simple solution in python:

    n=int(input().strip())
    i=1
    while True:
        p=pow(i,n)
        if len(str(p))==n:
            print(p)
        if len(str(p))>n:
            break
        i+=1