euler/ruby/euler029.rb

9 lines
106 B
Ruby
Raw Normal View History

2014-04-25 23:59:14 +00:00
terms = []
(2..100).each do |a|
(2..100).each do |b|
terms << a**b
end
end
puts terms.uniq.count