{"provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubyco.hatenadiary.org%2Fentry%2F20060310%2Frand\" title=\"\u7dda\u5f62\u5408\u540c\u6cd5 - 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>","image_url":null,"type":"rich","url":"https://rubyco.hatenadiary.org/entry/20060310/rand","title":"\u7dda\u5f62\u5408\u540c\u6cd5","provider_url":"https://hatena.blog","width":"100%","description":"\u7dda\u5f62\u5408\u540c\u6cd5\u306b\u3088\u308b\u7591\u4f3c\u4e71\u6570\u751f\u6210\u5668\u3092Ruby\u3067\u66f8\u304d\u307e\u3057\u305f\u3002 class LinearCongruentialRandom A = 1812433253 def initialize(seed=314159) @state = seed end def next(max) @state = A * @state + 1 @state % max.to_i.abs end end r = LinearCongruentialRandom.new 100.times do print \"#{r.next(10000)}, \" end\u5b9f\u884c\u7d50\u679c\u3067\u3059\u3002 9228, 8685, 2306, 1419, 6008\u2026","blog_url":"https://rubyco.hatenadiary.org/","blog_title":"rubyco\uff08\u308b\u3073\u3053\uff09\u306e\u65e5\u8a18","height":"190","published":"2006-03-10 00:00:05","author_name":"rubyco","version":"1.0","author_url":"https://blog.hatena.ne.jp/rubyco/","categories":["am"]}