solution to problem 56
parent
a9d1671150
commit
e364cffdbf
|
@ -0,0 +1,11 @@
|
|||
require_relative 'euler'
|
||||
|
||||
def solution
|
||||
[].tap do |sums|
|
||||
(1..100).each do |a|
|
||||
(1..100).each do |b|
|
||||
sums << (a ** b).to_digit_list.inject(:+)
|
||||
end
|
||||
end
|
||||
end.max
|
||||
end
|
Loading…
Reference in New Issue