{"group":{"group":{"id":48,"name":"Project Euler I","lockable":false,"created_at":"2018-08-20T14:28:46.000Z","updated_at":"2025-12-14T01:33:56.000Z","description":"Solve Project Euler problems using MATLAB.","is_default":false,"created_by":26769,"badge_id":65,"featured":false,"trending":false,"solution_count_in_trending_period":171,"trending_last_calculated":"2025-12-14T00:00:00.000Z","image_id":604,"published":true,"community_created":false,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSolve Project Euler problems using MATLAB.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}","description_html":"\u003cdiv style = \"text-align: start; line-height: normal; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"display: block; min-width: 0px; padding-top: 0px; perspective-origin: 289.497px 10px; transform-origin: 289.497px 10px; \"\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; perspective-origin: 266.493px 10px; transform-origin: 266.493px 10px; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eSolve Project Euler problems using MATLAB.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","published_at":"2019-05-08T20:15:47.000Z"},"current_player":null},"problems":[{"id":230,"title":"Project Euler: Problem 1, Multiples of 3 and 5","description":"If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.\r\n\r\nFind the sum of all the multiples of 3 or 5 below the input value.\r\n\r\nThank you to \u003chttp://projecteuler.net/problem=1 Project Euler Problem 1\u003e","description_html":"\u003cp\u003eIf we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.\u003c/p\u003e\u003cp\u003eFind the sum of all the multiples of 3 or 5 below the input value.\u003c/p\u003e\u003cp\u003eThank you to \u003ca href=\"http://projecteuler.net/problem=1\"\u003eProject Euler Problem 1\u003c/a\u003e\u003c/p\u003e","function_template":"function y = euler001(x)\r\n  y = rand;\r\nend","test_suite":"%%\r\nx = 1000;\r\ny_correct = 233168;\r\nassert(isequal(euler001(x),y_correct))\r\n\r\n%%\r\nx = 4000;\r\ny_correct = 3732668;\r\nassert(isequal(euler001(x),y_correct))\r\n\r\n%%\r\nx = 2340;\r\ny_correct = 1276470;\r\nassert(isequal(euler001(x),y_correct))\r\n\r\n%%\r\nx = 2341;\r\ny_correct = 1278810;\r\nassert(isequal(euler001(x),y_correct))\r\n\r\n","published":true,"deleted":false,"likes_count":49,"comments_count":5,"created_by":240,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":3677,"test_suite_updated_at":"2012-02-02T21:27:24.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-02-02T14:46:43.000Z","updated_at":"2026-03-31T15:10:58.000Z","published_at":"2012-02-02T21:43:40.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFind the sum of all the multiples of 3 or 5 below the input value.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThank you to\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://projecteuler.net/problem=1\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eProject Euler Problem 1\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":232,"title":"Project Euler: Problem 2, Sum of even Fibonacci","description":"Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:\r\n1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...\r\nBy considering the terms in the Fibonacci sequence whose values do not exceed the input value, find the sum of the even-valued terms.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 123px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 406.5px 61.5px; transform-origin: 406.5px 61.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.5px 21px; text-align: left; transform-origin: 383.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 383.5px 7.81667px; transform-origin: 383.5px 7.81667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eEach new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.5px 10.5px; text-align: left; transform-origin: 383.5px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 109.992px 7.81667px; transform-origin: 109.992px 7.81667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.5px 21px; text-align: left; transform-origin: 383.5px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 376.317px 7.81667px; transform-origin: 376.317px 7.81667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eBy considering the terms in the Fibonacci sequence whose values do not exceed the input value, find the sum of the even-valued terms.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = euler002(x)\r\n  y = rand;\r\nend","test_suite":"%%\r\nfiletext = fileread('euler002.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'regexp') || ...\r\n    contains(filetext, '144');\r\nassert(~illegal)\r\n\r\n%%\r\nx =2;\r\nassert(isequal(euler002(x),2))\r\n\r\n%%\r\nx =4000000;\r\ny_correct = 4613732;\r\nassert(isequal(euler002(x),y_correct))\r\n\r\n%%\r\nx =97455000;\r\ny_correct = 82790070;\r\nassert(isequal(euler002(x),y_correct))\r\n\r\n%%\r\nx =597455000;\r\ny_correct = 350704366;\r\nassert(isequal(euler002(x),y_correct))\r\n\r\n%%\r\nx =666576;\r\ny_correct = 257114;\r\nassert(isequal(euler002(x),y_correct))","published":true,"deleted":false,"likes_count":31,"comments_count":8,"created_by":1,"edited_by":223089,"edited_at":"2024-07-04T14:55:54.000Z","deleted_by":null,"deleted_at":null,"solvers_count":2837,"test_suite_updated_at":"2024-07-04T14:55:54.000Z","rescore_all_solutions":false,"group_id":27,"created_at":"2012-02-02T15:26:01.000Z","updated_at":"2026-03-31T16:32:01.000Z","published_at":"2012-02-07T15:29:53.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEach new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBy considering the terms in the Fibonacci sequence whose values do not exceed the input value, find the sum of the even-valued terms.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":234,"title":"Project Euler: Problem 3, Largest prime factor","description":"The prime factors of 13195 are 5, 7, 13 and 29.\r\n\r\nWhat is the largest prime factor of the number being input, input might be uint64 for large numbers, out must be double precision?\r\n\r\nThank you to \u003chttp://projecteuler.net/problem=3 Project Euler Problem 3\u003e","description_html":"\u003cp\u003eThe prime factors of 13195 are 5, 7, 13 and 29.\u003c/p\u003e\u003cp\u003eWhat is the largest prime factor of the number being input, input might be uint64 for large numbers, out must be double precision?\u003c/p\u003e\u003cp\u003eThank you to \u003ca href=\"http://projecteuler.net/problem=3\"\u003eProject Euler Problem 3\u003c/a\u003e\u003c/p\u003e","function_template":"function y = euler003(x)\r\n  y = rand;\r\nend","test_suite":"%%\r\nx = 600851475143;\r\ny_correct = 6857;\r\nassert(isequal(euler003(x),y_correct))\r\n\r\n%%\r\nx = 3916767508299776;\r\ny_correct = 457;\r\nassert(isequal(euler003(x),y_correct))\r\n\r\n%%\r\nx = 32167675;\r\ny_correct = 1286707;\r\nassert(isequal(euler003(x),y_correct))\r\n\r\n\r\n%%\r\nx = uint64(321676750829977632);\r\ny_correct = 206830397;\r\nassert(isequal(euler003(x),y_correct))\r\n\r\n%%\r\nx = 321676755;\r\ny_correct = 5639;\r\nassert(isequal(euler003(x),y_correct))\r\n\r\n%%\r\nx = 361125;\r\ny_correct = 107;\r\nassert(isequal(euler003(x),y_correct))\r\n\r\n\r\n%% \r\nx = 13916767508299776;\r\ny_correct = 98779;\r\nassert(isequal(euler003(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":12,"comments_count":2,"created_by":240,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":1790,"test_suite_updated_at":"2012-02-07T15:27:25.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-02-02T15:37:18.000Z","updated_at":"2026-03-15T18:58:02.000Z","published_at":"2012-02-07T16:32:43.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe prime factors of 13195 are 5, 7, 13 and 29.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWhat is the largest prime factor of the number being input, input might be uint64 for large numbers, out must be double precision?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThank you to\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://projecteuler.net/problem=3\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eProject Euler Problem 3\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":235,"title":"Project Euler: Problem 4, Palindromic numbers","description":"A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 99.\r\nFind the largest palindrome made from the product of numbers less than or equal to the input number.\r\nThank you to Project Euler Problem 4","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 102px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 51px; transform-origin: 407px 51px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21px; text-align: left; transform-origin: 384px 21px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 384px 8px; transform-origin: 384px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 99.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 321px 8px; transform-origin: 321px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eFind the largest palindrome made from the product of numbers less than or equal to the input number.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 41.5px 8px; transform-origin: 41.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThank you to\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eProject Euler Problem 4\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = euler004(x)\r\n  y = rand;\r\nend","test_suite":"%%\r\nx = 12;\r\ny_correct = 121;\r\nassert(isequal(euler004(x),y_correct))\r\n\r\n%%\r\nx = 25;\r\ny_correct = 575;\r\nassert(isequal(euler004(x),y_correct))\r\n\r\n%%\r\nx = 999;\r\ny_correct = 906609;\r\nassert(isequal(euler004(x),y_correct))\r\n\r\n%%\r\nx = 9999;\r\ny_correct = 99000099;\r\nassert(isequal(euler004(x),y_correct))\r\n\r\n%%\r\nx = 100;\r\ny_correct = 9009;\r\nassert(isequal(euler004(x),y_correct))\r\n\r\n%%\r\nx = 2500;\r\ny_correct = 6167616;\r\nassert(isequal(euler004(x),y_correct))\r\n\r\n%%\r\nx = 200;\r\ny_correct = 36863;\r\nassert(isequal(euler004(x),y_correct))\r\n\r\n%%\r\nx = 1234;\r\ny_correct = 1503051;\r\nassert(isequal(euler004(x),y_correct))","published":true,"deleted":false,"likes_count":14,"comments_count":7,"created_by":240,"edited_by":223089,"edited_at":"2023-01-29T06:25:30.000Z","deleted_by":null,"deleted_at":null,"solvers_count":1268,"test_suite_updated_at":"2023-01-29T06:25:30.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-02-02T15:46:47.000Z","updated_at":"2026-03-24T14:13:17.000Z","published_at":"2012-02-02T20:33:24.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 99.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFind the largest palindrome made from the product of numbers less than or equal to the input number.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThank you to\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eProject Euler Problem 4\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":239,"title":"Project Euler: Problem 5, Smallest multiple","description":"2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.\r\n\r\nWhat is the smallest positive number that is evenly divisible by all of the numbers from 1 to input number?\r\n\r\nThank you to \u003chttp://projecteuler.net/problem=5 Project Euler Problem 5\u003e","description_html":"\u003cp\u003e2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.\u003c/p\u003e\u003cp\u003eWhat is the smallest positive number that is evenly divisible by all of the numbers from 1 to input number?\u003c/p\u003e\u003cp\u003eThank you to \u003ca href=\"http://projecteuler.net/problem=5\"\u003eProject Euler Problem 5\u003c/a\u003e\u003c/p\u003e","function_template":"function y = euler005(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 20;\r\ny_correct = 232792560;\r\nassert(isequal(euler005(x),y_correct))\r\n\r\n%%\r\nx = 10;\r\ny_correct = 2520;\r\nassert(isequal(euler005(x),y_correct))\r\n\r\n%%\r\nx = 12;\r\ny_correct = 27720;\r\nassert(isequal(euler005(x),y_correct))\r\n\r\n%%\r\nx = 14;\r\ny_correct = 360360;\r\nassert(isequal(euler005(x),y_correct))","published":true,"deleted":false,"likes_count":11,"comments_count":4,"created_by":240,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":1651,"test_suite_updated_at":"2012-02-02T20:39:22.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-02-02T19:45:07.000Z","updated_at":"2026-03-15T18:59:49.000Z","published_at":"2012-02-02T20:39:22.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWhat is the smallest positive number that is evenly divisible by all of the numbers from 1 to input number?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThank you to\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://projecteuler.net/problem=5\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eProject Euler Problem 5\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":240,"title":"Project Euler: Problem 6, Natural numbers, squares and sums.","description":"The sum of the squares of the first ten natural numbers is,\r\n\r\n1^2 + 2^2 + ... + 10^2 = 385\r\nThe square of the sum of the first ten natural numbers is,\r\n\r\n(1 + 2 + ... + 10)^2 = 55^2 = 3025\r\nHence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 - 385 = 2640.\r\n\r\nFind the difference between the sum of the squares of the first N (where N is the input) natural numbers and the square of the sum.\r\n\r\nThank you to \u003chttp://projecteuler.net/problem=6 Project Euler Problem 6\u003e","description_html":"\u003cp\u003eThe sum of the squares of the first ten natural numbers is,\u003c/p\u003e\u003cp\u003e1^2 + 2^2 + ... + 10^2 = 385\r\nThe square of the sum of the first ten natural numbers is,\u003c/p\u003e\u003cp\u003e(1 + 2 + ... + 10)^2 = 55^2 = 3025\r\nHence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 - 385 = 2640.\u003c/p\u003e\u003cp\u003eFind the difference between the sum of the squares of the first N (where N is the input) natural numbers and the square of the sum.\u003c/p\u003e\u003cp\u003eThank you to \u003ca href=\"http://projecteuler.net/problem=6\"\u003eProject Euler Problem 6\u003c/a\u003e\u003c/p\u003e","function_template":"function y = euler006(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 10;\r\ny_correct = 2640;\r\nassert(isequal(euler006(x),y_correct))\r\n\r\n%%\r\nx = 20;\r\ny_correct = 41230;\r\nassert(isequal(euler006(x),y_correct))\r\n\r\n%%\r\nx = 200;\r\ny_correct = 401323300;\r\nassert(isequal(euler006(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":12,"comments_count":3,"created_by":240,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":2540,"test_suite_updated_at":"2012-02-02T20:31:39.000Z","rescore_all_solutions":false,"group_id":27,"created_at":"2012-02-02T20:31:39.000Z","updated_at":"2026-03-26T08:44:39.000Z","published_at":"2012-02-02T20:32:49.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe sum of the squares of the first ten natural numbers is,\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ten natural numbers is,\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e(1 + 2 + ... + 10)^2 = 55^2 = 3025 Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 - 385 = 2640.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFind the difference between the sum of the squares of the first N (where N is the input) natural numbers and the square of the sum.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThank you to\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://projecteuler.net/problem=6\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eProject Euler Problem 6\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":241,"title":"Project Euler: Problem 7, Nth prime","description":"By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.\r\nWhat is the Nth prime number?\r\nThank you to Project Euler Problem 7","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 81px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 40.5px; transform-origin: 407px 40.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 298px 8px; transform-origin: 298px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eBy listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 97.5px 8px; transform-origin: 97.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWhat is the Nth prime number?\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 41.5px 8px; transform-origin: 41.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThank you to\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eProject Euler Problem 7\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = euler007(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nfiletext = fileread('euler007.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'regexp') || ...\r\n          contains(filetext, 'if') || contains(filetext, 'switch'); \r\nassert(~illegal)\r\n\r\n%%\r\nx = 6;\r\ny_correct = 13;\r\nassert(isequal(euler007(x),y_correct))\r\n\r\n%%\r\nx = 69;\r\ny_correct = 347;\r\nassert(isequal(euler007(x),y_correct))\r\n\r\n%%\r\nx = 420;\r\ny_correct = 2903;\r\nassert(isequal(euler007(x),y_correct))\r\n\r\n%%\r\nx = 1729;\r\ny_correct = 14759;\r\nassert(isequal(euler007(x),y_correct))\r\n\r\n%%\r\nx = 10001;\r\ny_correct = 104743;\r\nassert(isequal(euler007(x),y_correct))\r\n\r\n%%\r\nx = 123456;\r\ny_correct = 1632899;\r\nassert(isequal(euler007(x),y_correct))\r\n\r\n","published":true,"deleted":false,"likes_count":21,"comments_count":11,"created_by":240,"edited_by":223089,"edited_at":"2022-12-27T06:14:17.000Z","deleted_by":null,"deleted_at":null,"solvers_count":1753,"test_suite_updated_at":"2022-12-27T06:14:17.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-02-02T21:11:56.000Z","updated_at":"2026-03-15T19:01:28.000Z","published_at":"2012-02-03T14:47:05.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBy listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWhat is the Nth prime number?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThank you to\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eProject Euler Problem 7\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":246,"title":"Project Euler: Problem 8, Find largest product in a large string of numbers","description":"Find the greatest product of five consecutive digits in an n-digit number.\r\n\r\n7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843\r\n8586156078911294949545950173795833195285320880551112540698747158523863050715693290963295227443043557\r\n6689664895044524452316173185640309871112172238311362229893423380308135336276614282806444486645238749\r\n3035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776\r\n6572733300105336788122023542180975125454059475224352584907711670556013604839586446706324415722155397\r\n5369781797784617406495514929086256932197846862248283972241375657056057490261407972968652414535100474\r\n8216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586\r\n1786645835912456652947654568284891288314260769004224219022671055626321111109370544217506941658960408\r\n0719840385096245544436298123098787992724428490918884580156166097919133875499200524063689912560717606\r\n0588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450\r\n\r\nThe large number will be given as a string, 1xn characters.\r\n\r\nThank you to \u003chttp://projecteuler.net/problem=8 Project Euler Problem 8\u003e","description_html":"\u003cp\u003eFind the greatest product of five consecutive digits in an n-digit number.\u003c/p\u003e\u003cp\u003e7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843\r\n8586156078911294949545950173795833195285320880551112540698747158523863050715693290963295227443043557\r\n6689664895044524452316173185640309871112172238311362229893423380308135336276614282806444486645238749\r\n3035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776\r\n6572733300105336788122023542180975125454059475224352584907711670556013604839586446706324415722155397\r\n5369781797784617406495514929086256932197846862248283972241375657056057490261407972968652414535100474\r\n8216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586\r\n1786645835912456652947654568284891288314260769004224219022671055626321111109370544217506941658960408\r\n0719840385096245544436298123098787992724428490918884580156166097919133875499200524063689912560717606\r\n0588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450\u003c/p\u003e\u003cp\u003eThe large number will be given as a string, 1xn characters.\u003c/p\u003e\u003cp\u003eThank you to \u003ca href=\"http://projecteuler.net/problem=8\"\u003eProject Euler Problem 8\u003c/a\u003e\u003c/p\u003e","function_template":"function y = euler008(x)\r\n  y = x;\r\nend","test_suite":"%%\r\na = ['73167176531330624919225119674426574742355349194934'...\r\n     '96983520312774506326239578318016984801869478851843'...\r\n     '85861560789112949495459501737958331952853208805511'...\r\n     '12540698747158523863050715693290963295227443043557'...\r\n     '66896648950445244523161731856403098711121722383113'...\r\n     '62229893423380308135336276614282806444486645238749'...\r\n     '30358907296290491560440772390713810515859307960866'...\r\n     '70172427121883998797908792274921901699720888093776'...\r\n     '65727333001053367881220235421809751254540594752243'...\r\n     '52584907711670556013604839586446706324415722155397'...\r\n     '53697817977846174064955149290862569321978468622482'...\r\n     '83972241375657056057440261407972968652414535100474'...\r\n     '82166370484403199890058895243450658541227588666881'...\r\n     '16427171479924442928260863465674813919123162824586'...\r\n     '17866458359124566529486545682848912883142607690042'...\r\n     '24219022671055626321191109370544217506941658960408'...\r\n     '07198403850962455444362981230987879927244284909188'...\r\n     '84580156166097919133855499200524066689912560717606'...\r\n     '05886116467109405077541002256983155200055935729725'...\r\n     '71636269561882670428232483600823267530420752963450']\r\n \r\n\r\ny_correct = 40824;\r\nassert(isequal(euler008(a),y_correct))\r\n\r\n%%\r\n\r\na = ['73467176531330624919225119674426574742355349194934'...\r\n     '96953520312774506326239578318016984801869478851843'...\r\n     '85866560789112949495459501737958331952853208805511'...\r\n     '12540898747158523863050715693290963295227443043557'...\r\n     '66896698950445244523161731856403098711121722383113'...\r\n     '62229890423380308135336276614282806444486645238749'...\r\n     '30358907896290491560440772390713810515859307960866'...\r\n     '70172427621883998797908792274921901699720888093776'...\r\n     '65727333501053367881220235421809751254540594752243'...\r\n     '52584907511670556013604839586446706324415722155397'...\r\n     '53697817477846174064955149290862569321978468622482'...\r\n     '83972241775657056057490261407972968652414535100474'...\r\n     '82166370984403199890008895243450658541227588666881'...\r\n     '16427171079924442928230863465674813919123162824586'...\r\n     '17866458359124566529476545682848912883142607690042'...\r\n     '24219022671055626321111109370544217506941658960408'...\r\n     '07198403850962455444362981230987879927244284909188'...\r\n     '84580156166097919133875499200524063689912560717606'...\r\n     '05886116467109405077541002256983155200055935729725'...\r\n     '71636269561882670428252483600823257530420752963450']\r\n \r\na = reshape(a,10,100);\r\na = a';\r\na = a(:)';\r\n\r\ny_correct = 35721;\r\nassert(isequal(euler008(a),y_correct))\r\n\r\n%%\r\na = ['05886116460109405000541002256983155200055935029025'...\r\n     '96952652026120060506262622695082618016986080186960'...\r\n     '85866560089112960960956059501026095826295208805511'...\r\n     '12560089806001585226862605002629522060602606026550'...\r\n     '66896698950526161026185660026098011121022268261126'...\r\n     '62229890608026620661602828066060606086660522680609'...\r\n     '26026589009156060600002269001268105158592600960866'...\r\n     '00102602062699809090809220609219016990208880926006'...\r\n     '65020262626501052626608812202265602180905125226026'...\r\n     '52586090051160055601266060826958660606006261552690'...\r\n     '52669081060008606106006609551609290862569266226082'...\r\n     '82690226060506090261600090296865260160526510060060'...\r\n     '82166260061998900088952602660506585601220588666881'...\r\n     '16602010129282260862660656060812691912261628260586'...\r\n     '10866605826591260566529600658912882616026006900602'...\r\n     '26021902262626211111092600566021050696016589606008'...\r\n     '00198600268509626055606060260809920260602860909188'...\r\n     '86058015616609091912626805605640626689912560010606'...\r\n     '05886116606010960050005601002251552000559265029025'...\r\n     '01626626956188260060282526082668260602005296266050']\r\n \r\na = reshape(a,10,100);\r\na = a';\r\na = a(:)';\r\n\r\ny_correct = 31104;\r\nassert(isequal(euler008(a),y_correct))\r\n\r\n","published":true,"deleted":false,"likes_count":7,"comments_count":4,"created_by":240,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":1307,"test_suite_updated_at":"2012-02-03T14:44:44.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-02-03T14:44:44.000Z","updated_at":"2026-03-24T14:47:50.000Z","published_at":"2012-02-03T14:48:59.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFind the greatest product of five consecutive digits in an n-digit number.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843 8586156078911294949545950173795833195285320880551112540698747158523863050715693290963295227443043557 6689664895044524452316173185640309871112172238311362229893423380308135336276614282806444486645238749 3035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776 6572733300105336788122023542180975125454059475224352584907711670556013604839586446706324415722155397 5369781797784617406495514929086256932197846862248283972241375657056057490261407972968652414535100474 8216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586 1786645835912456652947654568284891288314260769004224219022671055626321111109370544217506941658960408 0719840385096245544436298123098787992724428490918884580156166097919133875499200524063689912560717606 0588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe large number will be given as a string, 1xn characters.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThank you to\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://projecteuler.net/problem=8\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eProject Euler Problem 8\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":249,"title":"Project Euler: Problem 9, Pythagorean numbers","description":"A Pythagorean triplet is a set of three natural numbers, a b c, for which,\r\n a^2 + b^2 = c^2\r\nFor example,\r\n 3^2 + 4^2 = 9 + 16 = 5^2 = 25.\r\nThere exists exactly one Pythagorean triplet for which a + b + c = N (the input).\r\nFind the product abc.\r\nThank you to Project Euler Problem 9.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"block-size: 199px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 408px 99.5px; transform-origin: 408px 99.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 220.525px 8px; transform-origin: 220.525px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA Pythagorean triplet is a set of three natural numbers, a b c, for which,\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 18px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 404px 9px; transform-origin: 404px 9px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; line-height: 18px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-inline-start: 4px; padding-left: 4px; text-wrap-mode: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(33, 33, 33); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(33, 33, 33); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(33, 33, 33); border-left-style: none; border-left-width: 0px; border-right-color: rgb(33, 33, 33); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 61.6px 8.5px; tab-size: 4; transform-origin: 61.6px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e a^2 + b^2 = c^2\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 40.8417px 8px; transform-origin: 40.8417px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eFor example,\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 18px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 404px 9px; transform-origin: 404px 9px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; line-height: 18px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-inline-start: 4px; padding-left: 4px; text-wrap-mode: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(33, 33, 33); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(33, 33, 33); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(33, 33, 33); border-left-style: none; border-left-width: 0px; border-right-color: rgb(33, 33, 33); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 119.35px 8.5px; tab-size: 4; transform-origin: 119.35px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e 3^2 + 4^2 = 9 + 16 = 5^2 = 25.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 243.692px 8px; transform-origin: 243.692px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThere exists exactly one Pythagorean triplet for which a + b + c = N (the input).\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 65.7333px 8px; transform-origin: 65.7333px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eFind the product abc.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 40.45px 8px; transform-origin: 40.45px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThank you to\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 1.94167px 8px; transform-origin: 1.94167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"about:blank\u0026lt;\u0026gt;\"\u003e\u003cspan style=\"border-block-end-color: rgb(0, 91, 130); border-block-start-color: rgb(0, 91, 130); border-bottom-color: rgb(0, 91, 130); border-inline-end-color: rgb(0, 91, 130); border-inline-start-color: rgb(0, 91, 130); border-left-color: rgb(0, 91, 130); border-right-color: rgb(0, 91, 130); border-top-color: rgb(0, 91, 130); caret-color: rgb(0, 91, 130); color: rgb(0, 91, 130); column-rule-color: rgb(0, 91, 130); outline-color: rgb(0, 91, 130); text-decoration-color: rgb(0, 91, 130); text-emphasis-color: rgb(0, 91, 130); \"\u003e\u003cspan style=\"\"\u003eProject Euler Problem 9\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 1.94167px 8px; transform-origin: 1.94167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = euler009(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nfiletext = fileread('euler009.m');\r\nassert(isempty(strfind(filetext, 'elseif')))\r\nassert(isempty(strfind(filetext, 'str2num')))\r\n\r\n%%\r\nx = 1000;\r\ny_correct =  31875000;\r\nassert(isequal(euler009(x),y_correct))\r\n\r\n%%\r\nx = 12;\r\ny_correct =  60;\r\nassert(isequal(euler009(x),y_correct))\r\n\r\n%%\r\nx = 2000;\r\ny_correct =  255000000;\r\nassert(isequal(euler009(x),y_correct))\r\n\r\n%%\r\nx = 320;\r\ny_correct =  1044480;\r\nassert(isequal(euler009(x),y_correct))\r\n\r\n%%\r\nx = 5000;\r\ny_correct = 3984375000;\r\nassert(isequal(euler009(x),y_correct))\r\n\r\n%%\r\nx = 240;\r\ny_correct = 48e4;\r\nassert(isequal(euler009(x),y_correct))\r\n\r\n%%\r\nx = 90;\r\ny_correct = 21060;\r\nassert(isequal(euler009(x),y_correct))\r\n\r\n%%\r\nx = 598;\r\ny_correct = 4825860;\r\nassert(isequal(euler009(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":12,"comments_count":8,"created_by":240,"edited_by":223089,"edited_at":"2026-01-18T07:05:22.000Z","deleted_by":null,"deleted_at":null,"solvers_count":1385,"test_suite_updated_at":"2026-01-18T07:05:22.000Z","rescore_all_solutions":false,"group_id":44,"created_at":"2012-02-03T18:08:00.000Z","updated_at":"2026-04-03T04:11:38.000Z","published_at":"2012-03-13T15:41:02.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA Pythagorean triplet is a set of three natural numbers, a b c, for which,\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ a^2 + b^2 = c^2]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFor example,\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ 3^2 + 4^2 = 9 + 16 = 5^2 = 25.]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThere exists exactly one Pythagorean triplet for which a + b + c = N (the input).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFind the product abc.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThank you to\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"about:blank\u0026lt;\u0026gt;\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eProject Euler Problem 9\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":250,"title":"Project Euler: Problem 10, Sum of Primes","description":"The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.\r\n\r\nFind the sum of all the primes below the input, N.\r\n\r\nThank you \u003chttp://projecteuler.net/problem=10 Project Euler Problem 10\u003e","description_html":"\u003cdiv style = \"text-align: start; line-height: 20px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: normal; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"display: block; min-width: 0px; padding-top: 0px; perspective-origin: 407px 40.5px; transform-origin: 407px 40.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThe sum of the primes less than or equal to 10 is 2 + 3 + 5 + 7 = 17.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eFind the sum of all the primes less than or equal to the input, N.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThank you\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"http://projecteuler.net/problem=10\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eProject Euler Problem 10\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = euler010(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 2000000;\r\ny_correct = 142913828922;\r\nassert(isequal(euler010(x),y_correct))\r\n\r\n%%\r\nx = 10;\r\ny_correct = 17;\r\nassert(isequal(euler010(x),y_correct))\r\n\r\n%%\r\nx = 200;\r\ny_correct =4227;\r\nassert(isequal(euler010(x),y_correct))\r\n\r\n%%\r\nx = 11;\r\ny_correct = 28;\r\nassert(isequal(euler010(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":9,"comments_count":7,"created_by":240,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":2093,"test_suite_updated_at":"2012-06-08T13:08:04.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-02-03T18:17:24.000Z","updated_at":"2026-03-15T19:05:27.000Z","published_at":"2012-02-03T18:17:24.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe sum of the primes less than or equal to 10 is 2 + 3 + 5 + 7 = 17.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFind the sum of all the primes less than or equal to the input, N.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThank you\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://projecteuler.net/problem=10\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eProject Euler Problem 10\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"}],"no_progress_badge":{"id":53,"name":"Unknown","symbol":"unknown","description":"Partially completed groups","description_html":null,"image_location":"/images/responsive/supporting/matlabcentral/cody/badges/problem_groups_unknown_2.png","bonus":null,"players_count":0,"active":false,"created_by":null,"updated_by":null,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"created_at":"2018-01-10T23:20:29.000Z","updated_at":"2018-01-10T23:20:29.000Z","community_badge_id":null,"award_multiples":false}}