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
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Project Euler #56: Powerful digit sum
You are viewing a single comment's thread. Return to all comments →
Simple solution in Python 3