{"id":403,"date":"2013-03-12T07:54:00","date_gmt":"2013-03-11T22:54:00","guid":{"rendered":""},"modified":"2021-06-05T13:05:27","modified_gmt":"2021-06-05T04:05:27","slug":"python_1101","status":"publish","type":"post","link":"https:\/\/www.sigmadesign.co.jp\/minomonchan\/2013\/03\/python_1101.html","title":{"rendered":"\u300c\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u3001\u306f\u3058\u3081\u3088\u3046\u300d\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u306e\u4e92\u9664\u6cd5\u3092Python\u3067\u66f8\u304f"},"content":{"rendered":"<p>\uff12\u3064\u306e\u6570\u5b57\u306e\u6700\u5927\u516c\u7d04\u6570\u3092\u5c0e\u304d\u3060\u3059\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u306e\u4e92\u9664\u6cd5\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092Python\u3067\u66f8\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-653\" src=\"http:\/\/www.sigmadesign.co.jp\/minomonchan\/wp-content\/uploads\/sites\/2\/2013\/03\/41Ugo9OyzSL_SY291_BO1204203200_QL40_ML2_.jpg\" alt=\"\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u3001\u306f\u3058\u3081\u3088\u3046\" width=\"207\" height=\"293\" \/><\/p>\n<p><a href=\"http:\/\/www.amazon.co.jp\/exec\/obidos\/ASIN\/4844332015\/shikakukingu-22\" target=\"_blank\" rel=\"nofollow noopener\">\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u3001\u306f\u3058\u3081\u3088\u3046<\/a><\/p>\n<p>\u7b2c\uff11\uff12\u7ae0\uff1a\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u306e\u4e92\u9664\u6cd5\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\uff08Euclidean algorithm\uff09<\/p>\n<div style=\"background-color: lightgray; padding: 10px;\">\n<pre><code>\r\n#!\/usr\/bin\/env python\r\n#!\/usr\/bin\/env python\r\n#-*- coding: utf-8 -*-\r\n\r\ndef euclidean():\r\n    a = int(raw_input(\"Enter the first number. : \"))\r\n    b = int(raw_input(\"Enter the second number. : \"))\r\n    ans = 1\r\n    if a &lt; b:\r\n        a, b = b, a\r\n    while 1:\r\n        r = a % b\r\n        if r == 0:\r\n            ans = b\r\n            break\r\n        else:\r\n            a = b\r\n            b = r\r\n    print \"The greatest common divisor is %d.\" % ans\r\n\r\nif __name__ == '__main__':\r\n    euclidean()\r\n<\/code><\/pre>\n<\/div>\n<p>\u3053\u308c\u306f\u3051\u3063\u3053\u3046\u7c21\u5358\u306b\u3067\u304d\u305f\u3002\u30d5\u30ed\u30fc\u30c1\u30e3\u30fc\u30c8\u3092\u898b\u3066\u3082\u3051\u3063\u3053\u3046\u5358\u7d14\u3002\u3053\u3093\u306a\u7c21\u5358\u306b\u6700\u5927\u516c\u7d04\u6570\u304c\u51fa\u305b\u308b\u306a\u3093\u3066\u77e5\u3089\u306a\u304b\u3063\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uff12\u3064\u306e\u6570\u5b57\u306e\u6700\u5927\u516c\u7d04\u6570\u3092\u5c0e\u304d\u3060\u3059\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u306e\u4e92\u9664\u6cd5\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092Python\u3067\u66f8\u304d\u307e\u3057\u305f\u3002 \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u3001\u306f\u3058\u3081\u3088 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":653,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[75],"tags":[33],"class_list":["post-403","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-python"],"_links":{"self":[{"href":"https:\/\/www.sigmadesign.co.jp\/minomonchan\/wp-json\/wp\/v2\/posts\/403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigmadesign.co.jp\/minomonchan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigmadesign.co.jp\/minomonchan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigmadesign.co.jp\/minomonchan\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigmadesign.co.jp\/minomonchan\/wp-json\/wp\/v2\/comments?post=403"}],"version-history":[{"count":0,"href":"https:\/\/www.sigmadesign.co.jp\/minomonchan\/wp-json\/wp\/v2\/posts\/403\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sigmadesign.co.jp\/minomonchan\/wp-json\/wp\/v2\/media\/653"}],"wp:attachment":[{"href":"https:\/\/www.sigmadesign.co.jp\/minomonchan\/wp-json\/wp\/v2\/media?parent=403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigmadesign.co.jp\/minomonchan\/wp-json\/wp\/v2\/categories?post=403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigmadesign.co.jp\/minomonchan\/wp-json\/wp\/v2\/tags?post=403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}