Created
May 10, 2012 11:14
-
-
Save kwappa/2652484 to your computer and use it in GitHub Desktop.
コンプガチャをシミュレートしてみよう
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r = Array.new(12).fill(0) ; while (r.include?(0)) do r[rand(r.count)] += 1 ; end ; puts "#{r.count}個のガチャをコンプするために #{r.inject(:+)}回抽選しました。" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www.slideshare.net/kwappa/ss-12877715