
{"id":16047,"date":"2014-11-14T13:54:08","date_gmt":"2014-11-14T13:54:08","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=16047"},"modified":"2014-11-14T13:54:08","modified_gmt":"2014-11-14T13:54:08","slug":"how-to-write-a-program-to-solve-related-to-euler-problem-8","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2014\/11\/14\/how-to-write-a-program-to-solve-related-to-euler-problem-8\/","title":{"rendered":"How to write a program to solve related to euler problem 8 ?"},"content":{"rendered":"<pre>\n# This code related is taken from http:\/\/code.jasonbhill.com\/python\/project-euler-problem-8\/\nimport time\n\nstart = time.time()\n\nL = []\nL.append(\"73167176531330624919225119674426574742355349194934\")\nL.append(\"96983520312774506326239578318016984801869478851843\")\nL.append(\"85861560789112949495459501737958331952853208805511\")\nL.append(\"12540698747158523863050715693290963295227443043557\")\nL.append(\"66896648950445244523161731856403098711121722383113\")\nL.append(\"62229893423380308135336276614282806444486645238749\")\nL.append(\"30358907296290491560440772390713810515859307960866\")\nL.append(\"70172427121883998797908792274921901699720888093776\")\nL.append(\"65727333001053367881220235421809751254540594752243\")\nL.append(\"52584907711670556013604839586446706324415722155397\")\nL.append(\"53697817977846174064955149290862569321978468622482\")\nL.append(\"83972241375657056057490261407972968652414535100474\")\nL.append(\"82166370484403199890008895243450658541227588666881\")\nL.append(\"16427171479924442928230863465674813919123162824586\")\nL.append(\"17866458359124566529476545682848912883142607690042\")\nL.append(\"24219022671055626321111109370544217506941658960408\")\nL.append(\"07198403850962455444362981230987879927244284909188\")\nL.append(\"84580156166097919133875499200524063689912560717606\")\nL.append(\"05886116467109405077541002256983155200055935729725\")\nL.append(\"71636269561882670428252483600823257530420752963450\")\nM = []\nfor s in L:\nfor t in list(s): M.append(t)\nprod = 0\nfor i in range(len(M)-4):\np = int(M[i])*int(M[i+1])*int(M[i+2])*int(M[i+3])*int(M[i+4])\nif p &gt; prod: prod = p\nprint prod\n\nelapsed = (time.time() - start)\nprint \"time: %s seconds\" % elapsed\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p># This code related is taken from http:\/\/code.jasonbhill.com\/python\/project-euler-problem-8\/ import time start = time.time() L = [] L.append(&#8220;73167176531330624919225119674426574742355349194934&#8221;) L.append(&#8220;96983520312774506326239578318016984801869478851843&#8221;) L.append(&#8220;85861560789112949495459501737958331952853208805511&#8221;) L.append(&#8220;12540698747158523863050715693290963295227443043557&#8221;) L.append(&#8220;66896648950445244523161731856403098711121722383113&#8221;) L.append(&#8220;62229893423380308135336276614282806444486645238749&#8221;) L.append(&#8220;30358907296290491560440772390713810515859307960866&#8221;) L.append(&#8220;70172427121883998797908792274921901699720888093776&#8221;) L.append(&#8220;65727333001053367881220235421809751254540594752243&#8221;) L.append(&#8220;52584907711670556013604839586446706324415722155397&#8221;) L.append(&#8220;53697817977846174064955149290862569321978468622482&#8221;) L.append(&#8220;83972241375657056057490261407972968652414535100474&#8221;) L.append(&#8220;82166370484403199890008895243450658541227588666881&#8221;) L.append(&#8220;16427171479924442928230863465674813919123162824586&#8221;) L.append(&#8220;17866458359124566529476545682848912883142607690042&#8221;) L.append(&#8220;24219022671055626321111109370544217506941658960408&#8221;) L.append(&#8220;07198403850962455444362981230987879927244284909188&#8221;) L.append(&#8220;84580156166097919133875499200524063689912560717606&#8221;) L.append(&#8220;05886116467109405077541002256983155200055935729725&#8221;) L.append(&#8220;71636269561882670428252483600823257530420752963450&#8221;) M = [] for s in L: for t in list(s): M.append(t) prod = 0 for i in range(len(M)-4): &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2014\/11\/14\/how-to-write-a-program-to-solve-related-to-euler-problem-8\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to write a program to solve related to euler problem 8 ?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[734,1332,1577],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/16047"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=16047"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/16047\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=16047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=16047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=16047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}