Skip to content

Instantly share code, notes, and snippets.

/a.rb

Created October 19, 2016 22:32
Show Gist options
  • Save anonymous/ea74fab03c6543a81f77184e0d45c1f5 to your computer and use it in GitHub Desktop.
Save anonymous/ea74fab03c6543a81f77184e0d45c1f5 to your computer and use it in GitHub Desktop.
x = 10000000
y = 0
x.times do
a=[]
14.times do
b = rand(10)
a.push(b) #if !a.include?(b)
end
y += 1 if !a.include?(0) && !a.include?(3) && !a.include?(4) && !a.include?(7)
end
puts "#{y}/#{x}, #{y.to_f/x.to_f}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment