{"author_name":"rubyco","title":"\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u306e\u4e92\u9664\u6cd5","width":"100%","version":"1.0","published":"2006-03-07 00:00:01","blog_url":"https://rubyco.hatenadiary.org/","type":"rich","author_url":"https://blog.hatena.ne.jp/rubyco/","provider_name":"Hatena Blog","description":"Ruby\u3067\u300c\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u306e\u4e92\u9664\u6cd5\u300d\u3092\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002\u6700\u53e4\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u266a def euclid(m, n) loop do puts \"m = #{m}, n = #{n}\" if $DEBUG r = m % n return n if r == 0 m, n = n, r end end p euclid(60, 42)\u5b9f\u884c\u7d50\u679c\u3067\u3059\u3002-d\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570$DEBUG\u304ctrue\u306b\u306a\u308a\u307e\u3059\u3002 > ruby euclid.rb 6 > ruby -d euclid.rb m = 60, n = 42 m = 42, n = 18 m = 18, n = 6 6 Based on: \u300cC#\u2026","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubyco.hatenadiary.org%2Fentry%2F20060307%2Feuclid\" title=\"\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u306e\u4e92\u9664\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>","blog_title":"rubyco\uff08\u308b\u3073\u3053\uff09\u306e\u65e5\u8a18","provider_url":"https://hatena.blog","url":"https://rubyco.hatenadiary.org/entry/20060307/euclid","categories":["am"],"image_url":null,"height":"190"}