{"author_name":"obelisk2","image_url":null,"blog_title":"Camera Obscura","title":"Ruby \u306e C\u62e1\u5f35\u3067\u7d04\u6570\u3092\u6c42\u3081\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u66f8\u3044\u305f","published":"2016-05-03 02:05:49","categories":["Ruby","C\u8a00\u8a9e","\u6570\u5b66","Gem"],"provider_name":"Hatena Blog","blog_url":"https://obelisk.hatenablog.com/","author_url":"https://blog.hatena.ne.jp/obelisk2/","provider_url":"https://hatena.blog","description":"\u306a\u305c\u304b Ruby \u672c\u4f53\u306b\u306f\u3001\u7d04\u6570\u3092\u6c42\u3081\u308b\u30e1\u30bd\u30c3\u30c9\u304c\u306a\u3044\u3088\u3046\u3067\u3059\u306e\u3067\u3001C\u62e1\u5f35\u3067\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002\u4ee5\u524d\u66f8\u3044\u305f Utilsc \u3078\u306e\u6a5f\u80fd\u8ffd\u52a0\u3067\u3059\u3002\u30b3\u30fc\u30c9\u306f\u5fc5\u8981\u306a\u90e8\u5206\u3060\u3051\u8f09\u305b\u307e\u3059\u3002\u5168\u4f53\u306e\u30b3\u30fc\u30c9\u306f\u3053\u3053 \u3067\u3059\u3002 #include \"utilsc.h\" #include \"math.h\" VALUE divisors(VALUE self) { int a; long i, se; VALUE ar; se = FIX2LONG(self); ar = rb_ary_new(); a = (int)sqrt(se); for (i = 1; i <= a; i++) { if (!(se % i)) { rb_\u2026","type":"rich","version":"1.0","url":"https://obelisk.hatenablog.com/entry/2016/05/03/020549","height":"190","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2016%2F05%2F03%2F020549\" title=\"Ruby \u306e C\u62e1\u5f35\u3067\u7d04\u6570\u3092\u6c42\u3081\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u66f8\u3044\u305f - Camera Obscura\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}