My try to solve Project Euler no. 29 using Ruby
a = 2..100 b = 2..100 ans = Array.new a.each do |my_a| b.each do |my_b| ans << my_a ** my_b end end puts ans.uniq!.count
No comments:
Post a Comment