Project Euler 56 - Powerful digit sum
Project Euler 56 - Powerful digit sum
Official link: https://projecteuler.net/problem=56
Thought Process
Thought Process
Extremely simple problem again, just do a double nested loop for a and b where 2 <= a <= 100 and 1 <= b <= 100, then using my digit sum function, I calculate digit_sum(a^b) and keep track of the maximum
Interactive Code
Interactive Code
Input an integer (yourinput)
Code will output the maximum digit sum and the pair (a,b) such that a^b results in the maximum digit sum where a, b < yourinput