You are viewing a single comment's thread. Return to all comments →
Simple solution in Python 3
n=int(input().strip()) m=0 for i in range(1,n): for j in range(1,n): s=sum(map(int,list(str(pow(i,j))))) if s>m: m=s print(m)
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #56: Powerful digit sum
You are viewing a single comment's thread. Return to all comments →
Simple solution in Python 3