{"id":113003,"date":"2024-03-22T20:47:42","date_gmt":"2024-03-22T11:47:42","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7%e6%9c%80%e5%a4%a7%e5%85%ac%e7%b4%84%e6%95%b0%e3%82%92%e6%b1%82%e3%82%81%e3%82%8b%e6%96%b9%e6%b3%95\/"},"modified":"2024-04-04T04:13:06","modified_gmt":"2024-04-03T19:13:06","slug":"python%e3%81%a7%e6%9c%80%e5%a4%a7%e5%85%ac%e7%b4%84%e6%95%b0%e3%82%92%e6%b1%82%e3%82%81%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7%e6%9c%80%e5%a4%a7%e5%85%ac%e7%b4%84%e6%95%b0%e3%82%92%e6%b1%82%e3%82%81%e3%82%8b%e6%96%b9%e6%b3%95\/","title":{"rendered":"Python\u3067\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>Python\u3067\u306f\u30012\u3064\u306e\u6570\u5024\u306e\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u306b\u306f\u6b21\u306e\u65b9\u6cd5\u304c\u5229\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u65b9\u6cd51\uff1a\u30eb\u30fc\u30d7\u3092\u4f7f\u7528\u3059\u308b<\/p>\n<pre class=\"post-pre\"><code><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title function_\">get_common_divisors<\/span>(<span class=\"hljs-params\">num1, num2<\/span>):\r\n    common_divisors = []\r\n    smaller_num = <span class=\"hljs-built_in\">min<\/span>(num1, num2)\r\n    <span class=\"hljs-keyword\">for<\/span> i <span class=\"hljs-keyword\">in<\/span> <span class=\"hljs-built_in\">range<\/span>(<span class=\"hljs-number\">1<\/span>, smaller_num + <span class=\"hljs-number\">1<\/span>):\r\n        <span class=\"hljs-keyword\">if<\/span> num1 % i == <span class=\"hljs-number\">0<\/span> <span class=\"hljs-keyword\">and<\/span> num2 % i == <span class=\"hljs-number\">0<\/span>:\r\n            common_divisors.append(i)\r\n    <span class=\"hljs-keyword\">return<\/span> common_divisors\r\n<\/code><\/pre>\n<p>\u518d\u5e30\u3092\u4f7f\u7528\u3057\u305f\u65b9\u6cd52<\/p>\n<pre class=\"post-pre\"><code><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title function_\">get_common_divisors<\/span>(<span class=\"hljs-params\">num1, num2<\/span>):\r\n    <span class=\"hljs-keyword\">if<\/span> num2 == <span class=\"hljs-number\">0<\/span>:\r\n        <span class=\"hljs-keyword\">return<\/span> num1\r\n    <span class=\"hljs-keyword\">else<\/span>:\r\n        <span class=\"hljs-keyword\">return<\/span> get_common_divisors(num2, num1 % num2)\r\n<\/code><\/pre>\n<p>\uff12\u3064\u306e\u6570\u306e\u6700\u5927\u516c\u7d04\u6570\u3092\u53d6\u308a\u51fa\u3059\u306b\u306f\u3001\u30e1\u30bd\u30c3\u30c9\uff12\u306e\u518d\u5e30\u51e6\u7406\u304c\u3001\u3059\u3079\u3066\u306e\u516c\u7d04\u6570\u3092\u53d6\u308a\u51fa\u3059\u306b\u306f\u3001\u30e1\u30bd\u30c3\u30c9\uff11\u306e\u30eb\u30fc\u30d7\u51e6\u7406\u304c\u826f\u3044<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python\u3067\u306f\u30012\u3064\u306e\u6570\u5024\u306e\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u306b\u306f\u6b21\u306e\u65b9\u6cd5\u304c\u5229\u7528\u3067\u304d\u307e\u3059\u3002 \u65b9\u6cd51\uff1a\u30eb\u30fc\u30d7\u3092\u4f7f\u7528\u3059\u308b def get_common_divisors(num1, num2): common_divisors = []  [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-113003","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python\u3067\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u65b9\u6cd5 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/python\u3067\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u65b9\u6cd5\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python\u3067\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u65b9\u6cd5\" \/>\n<meta property=\"og:description\" content=\"Python\u3067\u306f\u30012\u3064\u306e\u6570\u5024\u306e\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u306b\u306f\u6b21\u306e\u65b9\u6cd5\u304c\u5229\u7528\u3067\u304d\u307e\u3059\u3002 \u65b9\u6cd51\uff1a\u30eb\u30fc\u30d7\u3092\u4f7f\u7528\u3059\u308b def get_common_divisors(num1, num2): common_divisors = [] [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/python\u3067\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u65b9\u6cd5\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-22T11:47:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-03T19:13:06+00:00\" \/>\n<meta name=\"author\" content=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7%e6%9c%80%e5%a4%a7%e5%85%ac%e7%b4%84%e6%95%b0%e3%82%92%e6%b1%82%e3%82%81%e3%82%8b%e6%96%b9%e6%b3%95\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7%e6%9c%80%e5%a4%a7%e5%85%ac%e7%b4%84%e6%95%b0%e3%82%92%e6%b1%82%e3%82%81%e3%82%8b%e6%96%b9%e6%b3%95\/\",\"name\":\"Python\u3067\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u65b9\u6cd5 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2024-03-22T11:47:42+00:00\",\"dateModified\":\"2024-04-03T19:13:06+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7%e6%9c%80%e5%a4%a7%e5%85%ac%e7%b4%84%e6%95%b0%e3%82%92%e6%b1%82%e3%82%81%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7%e6%9c%80%e5%a4%a7%e5%85%ac%e7%b4%84%e6%95%b0%e3%82%92%e6%b1%82%e3%82%81%e3%82%8b%e6%96%b9%e6%b3%95\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7%e6%9c%80%e5%a4%a7%e5%85%ac%e7%b4%84%e6%95%b0%e3%82%92%e6%b1%82%e3%82%81%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\u3067\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u65b9\u6cd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27\",\"name\":\"\u82bd\u4f9d, \u96e8\u591c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"caption\":\"\u82bd\u4f9d, \u96e8\u591c\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7%e6%9c%80%e5%a4%a7%e5%85%ac%e7%b4%84%e6%95%b0%e3%82%92%e6%b1%82%e3%82%81%e3%82%8b%e6%96%b9%e6%b3%95\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python\u3067\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u65b9\u6cd5 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/python\u3067\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u65b9\u6cd5\/","og_locale":"ja_JP","og_type":"article","og_title":"Python\u3067\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u65b9\u6cd5","og_description":"Python\u3067\u306f\u30012\u3064\u306e\u6570\u5024\u306e\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u306b\u306f\u6b21\u306e\u65b9\u6cd5\u304c\u5229\u7528\u3067\u304d\u307e\u3059\u3002 \u65b9\u6cd51\uff1a\u30eb\u30fc\u30d7\u3092\u4f7f\u7528\u3059\u308b def get_common_divisors(num1, num2): common_divisors = [] [&hellip;]","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/python\u3067\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u65b9\u6cd5\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2024-03-22T11:47:42+00:00","article_modified_time":"2024-04-03T19:13:06+00:00","author":"\u82bd\u4f9d, \u96e8\u591c","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u82bd\u4f9d, \u96e8\u591c"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7%e6%9c%80%e5%a4%a7%e5%85%ac%e7%b4%84%e6%95%b0%e3%82%92%e6%b1%82%e3%82%81%e3%82%8b%e6%96%b9%e6%b3%95\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7%e6%9c%80%e5%a4%a7%e5%85%ac%e7%b4%84%e6%95%b0%e3%82%92%e6%b1%82%e3%82%81%e3%82%8b%e6%96%b9%e6%b3%95\/","name":"Python\u3067\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u65b9\u6cd5 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2024-03-22T11:47:42+00:00","dateModified":"2024-04-03T19:13:06+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7%e6%9c%80%e5%a4%a7%e5%85%ac%e7%b4%84%e6%95%b0%e3%82%92%e6%b1%82%e3%82%81%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7%e6%9c%80%e5%a4%a7%e5%85%ac%e7%b4%84%e6%95%b0%e3%82%92%e6%b1%82%e3%82%81%e3%82%8b%e6%96%b9%e6%b3%95\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7%e6%9c%80%e5%a4%a7%e5%85%ac%e7%b4%84%e6%95%b0%e3%82%92%e6%b1%82%e3%82%81%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"Python\u3067\u6700\u5927\u516c\u7d04\u6570\u3092\u6c42\u3081\u308b\u65b9\u6cd5"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27","name":"\u82bd\u4f9d, \u96e8\u591c","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","caption":"\u82bd\u4f9d, \u96e8\u591c"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7%e6%9c%80%e5%a4%a7%e5%85%ac%e7%b4%84%e6%95%b0%e3%82%92%e6%b1%82%e3%82%81%e3%82%8b%e6%96%b9%e6%b3%95\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/113003","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=113003"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/113003\/revisions"}],"predecessor-version":[{"id":257100,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/113003\/revisions\/257100"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=113003"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=113003"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=113003"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}