Skip to content

Instantly share code, notes, and snippets.

@cielavenir
Created August 27, 2012 05:39
Show Gist options
  • Select an option

  • Save cielavenir/3485911 to your computer and use it in GitHub Desktop.

Select an option

Save cielavenir/3485911 to your computer and use it in GitHub Desktop.
Project Euler 36
#!/usr/bin/ruby
p 999999.times.map{|i|s,t=i.to_s,i.to_s(2);s.reverse==s&&t.reverse==t ?i:0}.reduce(&:+)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment