Skip to content

Instantly share code, notes, and snippets.

@pxlpnk
Created May 11, 2014 10:48
Show Gist options
  • Save pxlpnk/dd9e990b38ae274090f0 to your computer and use it in GitHub Desktop.
Save pxlpnk/dd9e990b38ae274090f0 to your computer and use it in GitHub Desktop.
proc{|l|s=l.size;[l[0..(s/2.0)-1],l[(s/2.0).ceil..s]]}['012003'.split('').map(&:to_i)].map{|l|l.reduce(:+)}.inject{|a,b|a==b}#lucky_number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment