{"categories":["Programming","Perl","C++"],"author_name":"qnighy","provider_name":"Hatena Blog","height":"190","url":"https://qnighy.hatenablog.com/entry/20100124/1264342447","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fqnighy.hatenablog.com%2Fentry%2F20100124%2F1264342447\" title=\"Perl\u3068C++\u306b\u3057\u304b\u3067\u304d\u306a\u3044\u3088\u3046\u306a\u6c17\u304c\u3059\u308b\u30a2\u30ce\u6a5f\u80fd(\u6311\u6226\u8005\u52df\u96c6\u4e2d) - \u7c21\u6f54\u306aQ\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/qnighy/","published":"2010-01-24 23:14:07","type":"rich","version":"1.0","blog_title":"\u7c21\u6f54\u306aQ","description":"Perl\u3068C++\u306f\u4e16\u754c\u4e00\u3002 #!/usr/bin/perl srand(time); my $a = 0; my $b = 0; for(my $i = 0; $i < 1000; $i++) { (rand(2)<1 ? $a : $b) += 1; } print \"$a, $b\\n\" #include <cstdio> #include <cstdlib> #include <time.h> int main(int argc, char **argv) { srand((unsigned)time(NULL)); int a=0, b=0; for(int i = 0; i < 100\u2026","provider_url":"https://hatena.blog","blog_url":"https://qnighy.hatenablog.com/","title":"Perl\u3068C++\u306b\u3057\u304b\u3067\u304d\u306a\u3044\u3088\u3046\u306a\u6c17\u304c\u3059\u308b\u30a2\u30ce\u6a5f\u80fd(\u6311\u6226\u8005\u52df\u96c6\u4e2d)","width":"100%"}