solution to problem 56

master
Evan Hemsley 2014-12-04 16:52:58 -08:00
parent a9d1671150
commit e364cffdbf
1 changed files with 11 additions and 0 deletions

11
euler056.rb Normal file
View File

@ -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