Skip to content

Instantly share code, notes, and snippets.

@cored

cored/test.rb Secret

Created April 29, 2013 19:47
Show Gist options
  • Save cored/db01d293661d05d3bdeb to your computer and use it in GitHub Desktop.
Save cored/db01d293661d05d3bdeb to your computer and use it in GitHub Desktop.
count = 0
File.readlines('seed.txt').each do |line|
start, finish = line.split(/\s+/)
count = (start.to_i..finish.to_i).each do |n|
count += 1 if n.to_s.reverse == n.to_s
end
end
puts count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment