{"image_url":null,"categories":["am"],"published":"2006-03-08 00:00:02","blog_title":"rubyco\uff08\u308b\u3073\u3053\uff09\u306e\u65e5\u8a18","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubyco.hatenadiary.org%2Fentry%2F20060308%2Fgraycode\" title=\"\u30b0\u30ec\u30a4\u30b3\u30fc\u30c9 - rubyco\uff08\u308b\u3073\u3053\uff09\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"\u30b0\u30ec\u30a4\u30b3\u30fc\u30c9","author_url":"https://blog.hatena.ne.jp/rubyco/","provider_name":"Hatena Blog","author_name":"rubyco","version":"1.0","description":"\u6307\u5b9a\u3057\u305f\u30d3\u30c3\u30c8\u6570\u306e\u30b0\u30ec\u30a4\u30b3\u30fc\u30c9\u8868\u3092\u4f5c\u308a\u307e\u3059\u3002 def gray_table(n) fmt = sprintf(\"%%0%db\\n\", n) (0...(1 << n)).each do |i| printf(fmt, i ^ (i >> 1)) end end gray_table(5)\u5b9f\u884c\u7d50\u679c\u3067\u3059\u3002 00000 00001 00011 00010 00110 00111 00101 00100 01100 01101 01111 01110 01010 01011 01001 01000 11000 11001 11011 11010 11110 11111 11101 11100 1010\u2026","height":"190","width":"100%","url":"https://rubyco.hatenadiary.org/entry/20060308/graycode","type":"rich","blog_url":"https://rubyco.hatenadiary.org/","provider_url":"https://hatena.blog"}