2007-08-21から1日間の記事一覧

飲んで空になったビール缶は机の上に並べず、ゴミ袋へ始末するようにすること。

ダイスで組分け・解答例

d:id:Nabetani:20070820#p1 を解くスクリプトを書いてみました。 #!/usr/bin/ruby require 'mathn' # for gcd class Groups < Hash def initialize super(0) self[[0, 0, 0, 0, 0, 0]] = 1 @members=0 end def iterate tmp = self.dup self.clear tmp.each{|…