We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
defsummer(n):'''Takes in an integer n and returns the sum of its digits'''returnsum([int(x)forxinstr(n)])n=int(input())print(max([summer(i**j)foriinrange(2,n)forjinrange(1,n)]))
Cookie support is required to access HackerRank
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 →
100/-points python3