{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2025-12-14T01:33:56.000Z","description":"Problems submitted by members of the MATLAB Central community.","is_default":true,"created_by":161519,"badge_id":null,"featured":false,"trending":false,"solution_count_in_trending_period":0,"trending_last_calculated":"2025-12-14T00:00:00.000Z","image_id":null,"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":null,"description_html":null,"published_at":null},"problems":[{"id":50023,"title":"Number Puzzles - 011","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 42px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 21px; transform-origin: 407px 21px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eA number p is a palindrome and is sitting halfway between m^2 and n^2. Give an example of [m n p]. The answer is not unique and, therefore, your answer will be checked against the requirement.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = puzzle_011()\r\n  y = [1 2 3];\r\nend","test_suite":"%%\r\ny=puzzle_011();\r\nassert(isequal((y(1)^2+y(2)^2)/2,y(3)))","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":31,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-28T20:56:02.000Z","updated_at":"2026-01-29T21:31:33.000Z","published_at":"2021-01-28T20:56: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 number p is a palindrome and is sitting halfway between m^2 and n^2. Give an example of [m n p]. The answer is not unique and, therefore, your answer will be checked against the requirement.\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":50018,"title":"Number Puzzles - 010","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eGive an example of fifteen (15) consecutive five-digit numbers whose sum is a palindrome.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = puzzle_010()\r\n  y = 1:15;\r\nend","test_suite":"%%\r\ny=puzzle_010();\r\nassert(isequal(length(num2str(y(1))),5))\r\nassert(isequal(y(15)-y(1)+1,15))\r\nassert(isequal(size(unique(y),2),15))\r\naa=num2str(sum(y));\r\nassert(strcmp(aa,fliplr(aa)))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":27,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-28T01:33:03.000Z","updated_at":"2026-02-25T10:48:18.000Z","published_at":"2021-01-28T01:33:03.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\u003eGive an example of fifteen (15) consecutive five-digit numbers whose sum is a palindrome.\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":50003,"title":"Number Puzzles - 007","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eGive an example of four prime numbers whose product is a palindrome.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = puzzle_007()\r\n  y = [1 2 3 4];\r\nend","test_suite":"%%\r\ny=puzzle_007();\r\nassert(isequal(size(unique(y),2),4))\r\nn=num2str(prod(y))\r\nassert(isequal(n,fliplr(n)))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":33,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-28T00:52:59.000Z","updated_at":"2026-02-25T10:40:33.000Z","published_at":"2021-01-28T00:53:27.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\u003eGive an example of four prime numbers whose product is a palindrome.\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":50013,"title":"Number Puzzles - 009","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eGive an example of ten (10) consecutive four-digit numbers whose sum is a palindrome.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = puzzle_009()\r\n  y = 1:10;\r\nend","test_suite":"%%\r\ny=puzzle_009();\r\nassert(isequal(length(num2str(y(1))),4))\r\nassert(isequal(y(10)-y(1)+1,10))\r\nassert(isequal(size(unique(y),2),10))\r\naa=num2str(sum(y));\r\nassert(strcmp(aa,fliplr(aa)))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":29,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-28T01:29:22.000Z","updated_at":"2026-01-29T20:54:01.000Z","published_at":"2021-01-28T01:29:22.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\u003eGive an example of ten (10) consecutive four-digit numbers whose sum is a palindrome.\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":2276,"title":"Palindrome Check","description":"Check whether the entire matrix is palindrome or not.\r\n\r\nExample\r\n\r\n matrix = [7 8 7]\r\n\r\n matrix_reverse = [7 8 7]\r\n\r\nSo the matrix is palindrome.","description_html":"\u003cp\u003eCheck whether the entire matrix is palindrome or not.\u003c/p\u003e\u003cp\u003eExample\u003c/p\u003e\u003cpre\u003e matrix = [7 8 7]\u003c/pre\u003e\u003cpre\u003e matrix_reverse = [7 8 7]\u003c/pre\u003e\u003cp\u003eSo the matrix is palindrome.\u003c/p\u003e","function_template":"function y = mat_palin(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = [1 9 0 7 4];\r\ny_correct = 0;\r\nassert(isequal(mat_palin(x),y_correct))\r\n\r\n%%\r\nx = [-2 9 0 9 -2];\r\ny_correct = 1;\r\nassert(isequal(mat_palin(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":22816,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":169,"test_suite_updated_at":"2014-04-09T05:15:56.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-04-09T05:11:28.000Z","updated_at":"2026-03-02T09:06:28.000Z","published_at":"2014-04-09T05:11:28.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\u003eCheck whether the entire matrix is palindrome or not.\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\u003eExample\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[ matrix = [7 8 7]\\n\\n matrix_reverse = [7 8 7]]]\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSo the matrix is palindrome.\u003c/w:t\u003e\u003c/w:r\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":50028,"title":"Number Puzzles - 012","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 42px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 21px; transform-origin: 407px 21px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eA number p is a palindrome and is sitting halfway between m^3 and n^3. Give an example of [m n p]. The answer is not unique and, therefore, your answer will be checked against the requirement.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = puzzle_012()\r\n  y = [1 2 3];\r\nend","test_suite":"%%\r\ny=puzzle_012();\r\nassert(isequal((y(1)^3+y(2)^3)/2,y(3)))\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":28,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-28T20:59:53.000Z","updated_at":"2026-01-29T21:32:07.000Z","published_at":"2021-01-28T20:59: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\u003eA number p is a palindrome and is sitting halfway between m^3 and n^3. Give an example of [m n p]. The answer is not unique and, therefore, your answer will be checked against the requirement.\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":54285,"title":"Palindrome Problem 1","description":"Continued Problem 50033: A palindrome  is one-thirteenth of the sum of  and , where  and  are also palindrome. Give an example of . ","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 43.9px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 331.5px 21.95px; transform-origin: 331.5px 21.95px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 308.5px 21.95px; text-align: left; transform-origin: 308.5px 21.95px; 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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eContinued Problem 50033: A palindrome \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003ep\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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is one-thirteenth of the sum of \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAtCAYAAADcMyneAAAAAXNSR0IArs4c6QAAA05JREFUWEft2FvIbVMYBuBnIyWnhAsUEUnkkLBFkTaRnMmZ4gI57NDeOct248ax5OyCnCLHG3HDxaZdXCAhSsohKcohEdGrb2iazf/3/2ux1n+xRq3Wao455nzH+33f+71jLbPEx7Iljs8M4LgRmjE4Y3BcBnrrN8Y5OBcH4Fu8gDvxLv7ov2+SObgZbsfxeAcbYXkB+qxAvz4tgCHiMuyOa/FNAdkJd+FoPIfz8V0X5KQY3AZ34AZ81GNpfzxf147B29MAuA/2wwMDebY1HscKHIy10wA4X61ticewFU7DJ0sN4K54CimQ1fhlqQE8EbfhzH54A3RSRTJXiLfAfVUYt+K3acnMEMANcCW2r9D+NHTTtBjMe0/HIbi6Osogy9MCGGAR5VX4er4SnwbAgLsIKwfAbY4NO51m4kVyIC6odvdFj7n05ivwUhmHv6YnyeC+uLvPUAfkDngTl+DvgpkUwF3waFms+VLuJDz7b0KdHNgOeyO7jiWK0qeProfDcBXS5HMtBiA7zmbTczN3JJ6u3825jGQthxjcDdnxxTgCXyEu40NcU6AjqLFIP9Q9b1UnuBTvIUxsiuPw4kjIatFcIc71G+vzTFXdefgZ91eo0js/xsnYo6NpcSdhfK//E2B2n4Q+u0L4Kbatnhn2Uon34mU8jINwfTF6OF4p13zqgP9bFKFzMbgznqxwxvH+XgCSa8nRW3B5Jf6PuKk0Lc+LY7655pImSYORx1wAGwt5eEo/4W26FSbj3w5F/yzRZT6aljPIWGMIYJeFAEyYc/JqI5UdMY2NT1jDZnMhzdvlrHHUkH1aLNohgLFAD+EEPIJU5vedB7f8+wCn4P3O3LG1mdeqqr9cLKCF2K0uQ2dVONu6tKOELSDzHc37tSbXr9yLO+nPjYxziMHG0LqyRKngNnbEEyUz0chXO3Np9A+W7GRjOQglTz8vORoJZB9gl6FUb/+M0EL4Bs6oImkv3hPRzE1K2POd+68r/fxPALYkj8j2+2I3hLHpkZkIdxsNfMQ7bS5/c6yZz4wuBHGfwfaS/DXRF9lUbYom59cL6yzRfUdyN/KTcU+Fe9DGLwRYu2dSbmYxmP5x7wzgyNTVwhmDMwbHZWDc9bMcHJfBPwHsq6kuL3/DIwAAAABJRU5ErkJggg==\" width=\"20\" height=\"22.5\" style=\"width: 20px; height: 22.5px;\"\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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e and \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAtCAYAAAAgJgIUAAAAAXNSR0IArs4c6QAAArtJREFUWEft11uozWkYx/HPRoRcOYQbh2hSikYxuKBkcuHYKIcc0hBuyJBTIYfBFTlNXGqcb4QLcrggF7iimUxuHEqNEc0FknLqqfe/2/3917b3sv/stN6btVbrXev9vs/z/J7n96/TClZdK2BQg8iyUIvEdx+JDpiIpRiHF7iCvbiK93lFtnRNBMAarMLtdNhQdEkwS3AcHxqCtDTEFCzEctxPB3XH71iEm5iFB2VBdMZuHMG1XMj7pQiMQICeLQuiL37BfrzJQXTCnhSlOThaFkRjE6BjitJs/Iwb3wKiG/7Ea/yK/78FxHCcwlqcKFuiRSkJ2YY6IiWr8eprQ0QLCElOT83rvyLKlu4T+TPGYBl+w6NKlVsmxCBsw3rca0w6ZUEEwA6swz85gKiNrnhc5hQdiE3Yib9zAO2wAA9xqSyIPjiAARVqIObIc8zDv2VAxAGHMO0z5nll6p71k7SoJiJkPTEYP2Jk8gPR+2N/VvHhFS6nsZ1NzKrMexFEhHQCZmJsCttU/IW4xWg8TSGNQ0N+MT2rXo2pYwO24EIqpvlog12IiXkSQxBGJdJQ9aoEEU4oCmwuNiYT0jsBvMVPuIiXiCjdqpog5bjo9z+km/ZPB8druKVs+kV1H05RCtBnZUBMxpnkC++mdGRNp33qASuwFZvxrqUh2qY/j24XK24aTiiTVKQlPkfRhkGpbzrVghTVRGZAQiGnC0xIqON8Uks4pYqDqalQRRDDcA698IkfRKQhFBKKiPfhlr5oFUEsxsEK9ryhajJpBnQY2/ycaDJYHiIzpAEST0zhhBo650w1PTApfRemZXuRY2oqRR4iuuUxjKqQiqiH66mL/pEGVTxxFTqmaiHGpyZ0BzMKzEgMqX2IfWFcQ55PmnpYpX1lmZpmcdUgyjA1zUpBw821dNTSkS+eVlETHwGnQ4IudpkxZgAAAABJRU5ErkJggg==\" width=\"16.5\" height=\"22.5\" style=\"width: 16.5px; height: 22.5px;\"\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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e, where \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003em\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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e and \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003en\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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e are also palindrome. Give an example of \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAG0AAAAkCAYAAACDr7TyAAAAAXNSR0IArs4c6QAAB1RJREFUaEPtmnXIrVUWh5/rqDP22BhYjNgtdncrBmMHKhY2dndg1yjOoGK3o3/YiY0tIjKDYisWdgcPrC2bc877vvv9zrn3+snZcBE5+91r7RW/9Vtrf2MYrlFngTGjTuOhwgydNgqDoK3TJgFWBB4BvhuF9/2jqTwBsCrwPPBpqXJtnDY9cCRwMfBqqYDhvkYLzAIcCJwLvNm4G4rhcUbgWOC8ocNKzNp6j/Y9pNRxJZkmJJ4GPAlcC/zaWqXhByUWWB7YEjgU+LrugxKnedAqkcK1h5VoNtxTaYG/AAcD3wSiVSZHk9NmAi4FTg/yMbT52LXAnMC/IkFeqRLV5LSdgZWBvYAvx66+w9MBs+0E4CfgOODnXlapc9pUwL+B+4BLhiYdZxZYMxy3FfBGW6ctAdwcxVESMlzjxgL/AK4Djgdub+u03YDtga1L+4dxc6c/vZSEcNY0IbKLkFTBY8LWuYFdgM//9KYa3AWdckwRtN3apI2nBCYMXvBDg6iJgVOB6aq4RJXTJo1Gz0K4P/BtjSD7uDmAxYBFY8x1NHAv8FdgU2BfwAA4Keisl/Fyq0VfslTIU9mRthVe1umCOgjtywAXAreGHhsAewDKugY4AvhkAL7yjhsCmwDzhx0eAnYAlgT2C5soylGVUyUZuTaoWkcBKwXKfdS5qcpp0wJXA88BHtCTxQTbWQiYN4y/CPB4CLPfOBOYHJg6er1no0a+G7R2DeA9wKL7flzePSNZCwIWcY2lHk/FuaKEjMwx3ERhXM/fuKpmjEQ48PcY8f0TuDwc5J3+E3PagwLuZOHbAf+tkXMY4Dn+e62t0x6LCzfdI2WmUHp2fKOznwgysy1wBZAiUCf9Lfq/xYFHB+A0dTTrlW89lvGqwzExzTG7lg1Z7l0r0KDpbqW/zxyB7iDCGeLhHROkhYGbAnFOaUiGbQCdPFadliu8I+As7Z1QWhg00o0eYeGZyLxzgO/DwA6h74oI/LjUSj321elhQdcIMrOUhT0p9QjlO4a6M+qZwSLU5xA4D3B9oIABVVd2+nJaEzym+1k/7gHEXxV/CzgrlE5saHPgoqhZsiJrV54ZTdFXYstkuNdDD4u/NcTgsBSYdf5rMlqJrM49OsE7+wKyBdA50bCE3ABYTpruqtOFb0eI/y+FxzZExDOFI7NFvL4xouiLEJbDghG+U/ZSkGfGIGpMMpx6PADsDnwQeuTBI4xbawa1ZIuSHmtVVUBILB4OgepVN7DQaQagGddFlgZB+fNsEcvNKCEwrY2youulJDip98gzoyd+t7BqbjgJgHVUx6WVgsf/V8eXWpzdtHX2YKTLhVzvmC/tbEBJzKoyMe1P9rTtknVL6LoOq1JIL+9Z0Fw75PTJZmng5ICfhOWp37OeOQ6zWdegaaXMuHIA8828Zvju58RcWEzL+1wVZGDQvaes1fJQ5ZAZop4bwDrOdiPXLfeBTFt7SAKF0a5VN3s0Mi3au8YBVc5NmSQkrdux1wZRBdYBDghml87JM6Pzt6bI7vV7nR6pYTVIhB77xUG9C2pDnSDZqgq+FDAvRhtS9/Kf7L43cH9bp00GXAC8HMbudck8k2xifRX4LBNkI3sb8FUPSEqQYmHW2da79aJNkNDIOq1DP8b3dY5s0iOvnVJ9s15qbpF/Ow4WlmxDDL66xrdTj7xWSvM7s2M+4LJovK1lTQ/JOlgG3olKv8tteppxmmFt6HRGOiDPJP/OwR4pd26CP/uTTkhKkGIzrqLWA9/vbAXUy/OkzRrRKPbsKmM26ZFqpwGorLmCep8fZybDCvHCkvftamoroiYnWp1kyoZeqF4/So294i810ZcS5YW6h9Amp4mvPsoZHb06+GQMM8kxztOZQjn89YKk5FAzzKbbM8R7R2ZpIrN2nCes1BEVx1Z3xPSlE6I9IocnXy68lzqlkVn6PanfBkLzb3179C/VXI72rPFO7f0TggcLIFlksh0ywJ0a9VxNTvMjFTHyZDI59PlbMnyvxniBoP9Gca/pg/M6xz3/i7njLVlxtr/aJ2rFNKH5CjW1NbUcVQ26hlPWrPFfgyN/1JXESNlXD1mlfVxeKw0s2bPZ7AxUqDXQDaaSearwbJ9nWyCXqFwlTrNeSBRcHlo1h6yT089vQoy11SF0KWT1I89aMlshWVE3Ic8Zaq96VqqHfnC059A9DQP6cpofGwVOq4WykjQvVbZkny8BNqYntiQIJWd37rGmKEfiUNLHJVi2Fvczy/Qc+UOq4bW6l2RaOkDHSUO9zN0F+DwSo3V+I7RKSKTUHw7iwJozhGQRJc1MS1qCBMvp9aJr5FSgsw6zXTmj9O9w2jhN+dJwC6yzxTa0uED3ri1ChZML2WTXm9JIDqz5xvpjDbUeGZB1DC8P4vSiMNLhgKVHJqs9q5rtLrXbOm3AthrVx6UmWDQQUh1Elzi770sPndbehD6kbhaTfB94XQ4ALBuyvpJa2F5q9sXQaX2Zb/x8PHTa+LF7X1KHTuvLfOPn498AiO7PNNx85rYAAAAASUVORK5CYII=\" width=\"54.5\" height=\"18\" style=\"width: 54.5px; height: 18px;\"\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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = pp1()\r\n  y = [m,n,p];\r\nend","test_suite":"%%\r\ny = pp1();\r\nassert(all(y\u003e0));\r\nassert( isequal(y(1)^2+y(2)^2,13*y(3)) );\r\nyy1 = num2str(y(1));\r\nassert( all(yy1==fliplr(yy1)) )\r\nyy2 = num2str(y(2));\r\nassert( all(yy2==fliplr(yy2)) )\r\nyy3 = num2str(y(3));\r\nassert( all(yy3==fliplr(yy3)) )\r\n\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":3,"created_by":2197980,"edited_by":2197980,"edited_at":"2022-04-20T06:54:09.000Z","deleted_by":null,"deleted_at":null,"solvers_count":14,"test_suite_updated_at":"2022-04-20T06:54:09.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2022-04-14T03:21:34.000Z","updated_at":"2026-03-02T14:10:46.000Z","published_at":"2022-04-14T03:21:34.000Z","restored_at":null,"restored_by":null,"spam":null,"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\u003eContinued Problem 50033: A palindrome \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ep\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is one-thirteenth of the sum of \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003em^2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e and \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003en^2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e, where \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003em\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e and \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e are also palindrome. Give an example of \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e(m,n,p)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\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":50033,"title":"Number Puzzles - 013","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 63px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 31.5px; transform-origin: 407px 31.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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 31.5px; text-align: left; transform-origin: 384px 31.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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThirteen is a special and supposedly scarry number. So, let's use it in this problem. A palindrome p is \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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eone-thirteenth\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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e of the sum of m^2 and n^2. Give an example of [m n p]. Note that the answer is not unique; so, your answer will simply be tested against the requirement.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = puzzle_013()\r\n  y = [13 13 13];\r\nend","test_suite":"%%\r\ny=puzzle_013();\r\nassert(isequal(y(1)^2+y(2)^2,13*y(3)))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":28,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-29T00:36:49.000Z","updated_at":"2026-01-29T21:33:19.000Z","published_at":"2021-01-29T00:36:49.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\u003eThirteen is a special and supposedly scarry number. So, let's use it in this problem. A palindrome p is \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eone-thirteenth\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e of the sum of m^2 and n^2. Give an example of [m n p]. Note that the answer is not unique; so, your answer will simply be tested against the requirement.\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":2275,"title":"Palindrome numbers","description":"Find the palindrome numbers (two or more digits) from 1 to n where n is the number passed to the function.","description_html":"\u003cp\u003eFind the palindrome numbers (two or more digits) from 1 to n where n is the number passed to the function.\u003c/p\u003e","function_template":"function y = palin(n)\r\n  y = x;\r\nend","test_suite":"%%\r\nn = 100;\r\ny_correct = [11 22 33 44 55 66 77 88 99]; \r\nassert(isequal(palin(n),y_correct))\r\n\r\n%%\r\nfor n = 101:110\r\n y_correct = [11 22 33 44 55 66 77 88 99 101]; \r\n assert(isequal(palin(n),y_correct))\r\nend\r\n\r\n%%\r\nn = 200;\r\ny_correct = [11 22 33 44 55 66 77 88 99 101 111 121 131 141 151 161 171 181 191]; \r\nassert(isequal(palin(n),y_correct))\r\n\r\n%%\r\nn = 300;\r\ny_correct = [11 22 33 44 55 66 77 88 99 101 111 121 131 141 151 161 171 181 191 202 212 222 232 242 252 262 272 282 292];\r\nassert(isequal(palin(n),y_correct))\r\n\r\n%%\r\nn = 400;\r\ny_correct = [11 22 33 44 55 66 77 88 99 101 111 121 131 141 151 161 171 181 191 202 212 222 232 242 252 262 272 282 292 303 313 323 333 343 353 363 373 383 393];\r\nassert(isequal(palin(n),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":3,"created_by":22816,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":73,"test_suite_updated_at":"2018-08-30T16:46:25.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-04-09T05:09:16.000Z","updated_at":"2025-11-21T16:32:11.000Z","published_at":"2014-04-09T05:09:16.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\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"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\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 palindrome numbers (two or more digits) from 1 to n where n is the number passed to the function.\u003c/w:t\u003e\u003c/w:r\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":49958,"title":"Previous Palindrome","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eGiven a number (num), determine three palindromes which come immediately before the given number.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = previous_palindrome(num)\r\n  y = num;\r\nend","test_suite":"%%\r\nnum=123;\r\ny=previous_palindrome(num);\r\ny_correct=[121 111 101];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=5221;\r\ny=previous_palindrome(num);\r\ny_correct=[5115 5005 4994];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=7031;\r\ny=previous_palindrome(num);\r\ny_correct=[7007 6996 6886];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=4141;\r\ny=previous_palindrome(num);\r\ny_correct=[4114 4004 3993];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=97627;\r\ny=previous_palindrome(num);\r\ny_correct=[97579 97479 97379];\r\nassert(isequal(y,y_correct))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":25,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-22T23:32:23.000Z","updated_at":"2026-03-13T18:57:41.000Z","published_at":"2021-01-22T23:34:03.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\u003eGiven a number (num), determine three palindromes which come immediately before the given number.\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":49953,"title":"Next Palindrome","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eGiven a number (num), find the next three palindromes that come immediately after this number.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = next_palindrome(num)\r\n  y = [11 111 1111];\r\nend","test_suite":"%%\r\nnum=11;\r\ny=next_palindrome(num);\r\ny_correct=[22 33 44];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=9909;\r\ny=next_palindrome(num);\r\ny_correct=[9999 10001 10101];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=734535;\r\ny=next_palindrome(num);\r\ny_correct=[735537 736637 737737];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=1234321;\r\ny=next_palindrome(num);\r\ny_correct=[1235321 1236321 1237321];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=6417;\r\ny=next_palindrome(num);\r\ny_correct=[6446 6556 6666];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=123;\r\ny=next_palindrome(num);\r\ny_correct=[131 141 151];\r\nassert(isequal(y,y_correct))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":26,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-22T23:22:24.000Z","updated_at":"2026-02-25T10:54:16.000Z","published_at":"2021-01-22T23:22:59.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\u003eGiven a number (num), find the next three palindromes that come immediately after this number.\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":50008,"title":"Number Puzzles - 008","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eGive an example of five prime numbers whose product is a palindrome.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = puzzle_008()\r\n  y = [1 2 3 4 5];\r\nend","test_suite":"%%\r\ny=puzzle_008();\r\nassert(isequal(size(unique(y),2),5))\r\nn=num2str(prod(y))\r\nassert(isequal(n,fliplr(n)))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":29,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-28T01:02:08.000Z","updated_at":"2026-03-17T07:45:10.000Z","published_at":"2021-01-28T01:02:08.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\u003eGive an example of five prime numbers whose product is a palindrome.\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":44512,"title":"Find if a given sentence is a palindrome","description":"Given a string/character array, return true if the string is a palindrome else returns false.\r\n\r\nFor example:\r\n\r\n  sample_text = \"Sore was I ere I saw Eros.\";\r\n  isPalindrome(sample_text);\r\n  ans =\r\n        True \r\n","description_html":"\u003cp\u003eGiven a string/character array, return true if the string is a palindrome else returns false.\u003c/p\u003e\u003cp\u003eFor example:\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003esample_text = \"Sore was I ere I saw Eros.\";\r\nisPalindrome(sample_text);\r\nans =\r\n      True \r\n\u003c/pre\u003e","function_template":"function y = isPalindrome(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = \"Nella's simple hymn: \"\"I attain my help, Miss Allen.\";\r\ny_correct = true;\r\nassert(isequal(isPalindrome(x),y_correct))\r\n\r\n%%\r\nx = \"Deliver desserts,\"\" demanded Nemesis, \"\"emended, named, stressed, reviled.\";\r\ny_correct = true;\r\nassert(isequal(isPalindrome(x),y_correct))\r\n\r\n%%\r\nx = \"Dennis danced\";\r\ny_correct = false;\r\nassert(isequal(isPalindrome(x),y_correct))\r\n\r\n%%\r\nx = \"Fred ate bread\";\r\ny_correct = false;\r\nassert(isequal(isPalindrome(x),y_correct))","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":132561,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":35,"test_suite_updated_at":"2018-02-07T10:05:57.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2018-02-05T11:44:20.000Z","updated_at":"2026-03-24T12:04:28.000Z","published_at":"2018-02-05T11:44:28.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\u003eGiven a string/character array, return true if the string is a palindrome else returns false.\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\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[sample_text = \\\"Sore was I ere I saw Eros.\\\";\\nisPalindrome(sample_text);\\nans =\\n      True]]\u003e\u003c/w:t\u003e\u003c/w:r\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":45663,"title":"Find the next binary palindrome number","description":"We all know, a *palindrome* is nothing but a number or character which remains the same after the forward or backward alteration of order. *202 or \"Mom\"* is the best example of a palindrome which remains the same as before, after the backward or forward alteration done.\r\n \r\nHowever, the problem is: how will you accomplish the task of *finding the next binary palindrome in an integer form as output* when you are given *a positive integer as input*.\r\n\r\n*Example: Input=2014 and Output=2015*","description_html":"\u003cp\u003eWe all know, a \u003cb\u003epalindrome\u003c/b\u003e is nothing but a number or character which remains the same after the forward or backward alteration of order. \u003cb\u003e202 or \"Mom\"\u003c/b\u003e is the best example of a palindrome which remains the same as before, after the backward or forward alteration done.\u003c/p\u003e\u003cp\u003eHowever, the problem is: how will you accomplish the task of \u003cb\u003efinding the next binary palindrome in an integer form as output\u003c/b\u003e when you are given \u003cb\u003ea positive integer as input\u003c/b\u003e.\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample: Input=2014 and Output=2015\u003c/b\u003e\u003c/p\u003e","function_template":"function y=NextBinaryPalindrome(x)\r\n y = x;\r\nend","test_suite":"%%\r\nx = 241;\r\ny_correct = 255;\r\nassert(isequal(NextBinaryPalindrome(x),y_correct))\r\n%%\r\nx = 2020;\r\ny_correct = 2047;\r\nassert(isequal(NextBinaryPalindrome(x),y_correct))\r\n%%\r\nx = 10051;\r\ny_correct =10233;\r\nassert(isequal(NextBinaryPalindrome(x),y_correct))\r\n%%\r\nx =40504;\r\ny_correct =40569;\r\nassert(isequal(NextBinaryPalindrome(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":430818,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":27,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2020-05-28T19:29:50.000Z","updated_at":"2020-05-28T19:41:28.000Z","published_at":"2020-05-28T19:41:28.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\u003eWe all know, a\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003epalindrome\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is nothing but a number or character which remains the same after the forward or backward alteration of order.\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e202 or \\\"Mom\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is the best example of a palindrome which remains the same as before, after the backward or forward alteration done.\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\u003eHowever, the problem is: how will you accomplish the task of\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003efinding the next binary palindrome in an integer form as output\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e when you are given\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ea positive integer as input\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample: Input=2014 and Output=2015\u003c/w:t\u003e\u003c/w:r\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":49998,"title":"Number Puzzles - 006","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eGive an example of three prime numbers whose product is a palindrome.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = puzzle_006()\r\n  y = [1 2 3];\r\nend","test_suite":"%%\r\ny=puzzle_006();\r\nassert(isequal(size(unique(y),2),3))\r\nn=num2str(prod(y));\r\nassert(isequal(n,fliplr(n)))","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":38,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-27T23:18:52.000Z","updated_at":"2026-03-30T19:12:37.000Z","published_at":"2021-01-27T23:20:27.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\u003eGive an example of three prime numbers whose product is a palindrome.\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":2055,"title":"Create numeric palindromes and their square roots","description":"Given a number n (1\u003c=n\u003c=9), return a left justified numeric matrix p with all the palindromes of the form 1 to n and back to 1. Use 0 for empty values. Similarly return the square root matrix in the same form.\r\n\r\nExample\r\n\r\n n=2;\r\n\r\n p=[1 0 0; 1 2 1];\r\n\r\n r=[1 0 0; 1 1 0];","description_html":"\u003cp\u003eGiven a number n (1\u0026lt;=n\u0026lt;=9), return a left justified numeric matrix p with all the palindromes of the form 1 to n and back to 1. Use 0 for empty values. Similarly return the square root matrix in the same form.\u003c/p\u003e\u003cp\u003eExample\u003c/p\u003e\u003cpre\u003e n=2;\u003c/pre\u003e\u003cpre\u003e p=[1 0 0; 1 2 1];\u003c/pre\u003e\u003cpre\u003e r=[1 0 0; 1 1 0];\u003c/pre\u003e","function_template":"function [p,r] = palinroot(n)\r\np=[1 0 0; 1 2 1];\r\nr=sqrt(p);\r\nend","test_suite":"%%\r\nn=3;\r\n[p,r]=palinroot(n);\r\ny_correct=[1 0 0 0 0; 1 2 1 0 0; 1 2 3 2 1];\r\nz_correct=[1 0 0; 1 1 0; 1 1 1];\r\nassert(isequal(p,y_correct))\r\nassert(isequal(r,z_correct))\r\n\r\n\r\n%%\r\nn=9;\r\n[p,r]=palinroot(n);\r\n\r\nrr=1;\r\nfor s1=2:n\r\n    rr(s1)=rr(s1-1)*10+1;\r\nend\r\nrr=num2str(rr','%.0f');\r\nz_correct=tril(fliplr(rr)-'0');\r\n\r\npp=zeros(n,n*2-1);\r\nfor s=1:n\r\n    p1=1:s;\r\n    p2=fliplr(p1);\r\n    st=deal([p1,p2(2:end)]);\r\n    pp(s,1:numel(st))=st;\r\nend\r\ny_correct=pp;\r\n\r\nassert(isequal(p,y_correct))\r\nassert(isequal(r,z_correct))\r\n\r\n%%\r\nn=5;\r\n[p,r]=palinroot(n);\r\n\r\nrr=1;\r\nfor s1=2:n\r\n    rr(s1)=rr(s1-1)*10+1;\r\nend\r\nrr=num2str(rr','%.0f');\r\nz_correct=tril(fliplr(rr)-'0');\r\n\r\npp=zeros(n,n*2-1);\r\nfor s=1:n\r\n    p1=1:s;\r\n    p2=fliplr(p1);\r\n    st=deal([p1,p2(2:end)]);\r\n    pp(s,1:numel(st))=st;\r\nend\r\ny_correct=pp;\r\n\r\nassert(isequal(p,y_correct))\r\nassert(isequal(r,z_correct))\r\n\r\n%%\r\nn=7;\r\n[p,r]=palinroot(n);\r\n\r\nrr=1;\r\nfor s1=2:n\r\n    rr(s1)=rr(s1-1)*10+1;\r\nend\r\nrr=num2str(rr','%.0f');\r\nz_correct=tril(fliplr(rr)-'0');\r\n\r\npp=zeros(n,n*2-1);\r\nfor s=1:n\r\n    p1=1:s;\r\n    p2=fliplr(p1);\r\n    st=deal([p1,p2(2:end)]);\r\n    pp(s,1:numel(st))=st;\r\nend\r\ny_correct=pp;\r\n\r\nassert(isequal(p,y_correct))\r\nassert(isequal(r,z_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":17471,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":25,"test_suite_updated_at":"2013-12-15T11:05:10.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-12-15T09:35:00.000Z","updated_at":"2026-01-02T17:16:23.000Z","published_at":"2013-12-15T10:36:26.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\u003eGiven a number n (1\u0026lt;=n\u0026lt;=9), return a left justified numeric matrix p with all the palindromes of the form 1 to n and back to 1. Use 0 for empty values. Similarly return the square root matrix in the same form.\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\u003eExample\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[ n=2;\\n\\n p=[1 0 0; 1 2 1];\\n\\n r=[1 0 0; 1 1 0];]]\u003e\u003c/w:t\u003e\u003c/w:r\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":52293,"title":"Palindromic Primes","description":"A Palindromic Prime is a prime number that is also a palindromic number. (Wiki, OEIS) \r\n\r\nIf given a monotonic series (increment=1) or a single number, give the corresonding palindromic prime.\r\nElse, if given a random array of numbers, check if the numbers in the array are palindromic prime or not.\r\nTake base 10 as the reference.\r\n\r\nExample\r\ninput = 2:5;\r\noutput = [3 5 7 11];\r\n\r\ninput = 17;\r\noutput = 787;\r\n\r\ninput = [7 23 47 11 4 10];\r\noutput = [1 0 0 1 0 0];","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: 374.467px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 187.233px; transform-origin: 407px 187.233px; 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: 233.5px 8px; transform-origin: 233.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA Palindromic Prime is a prime number that is also a palindromic number. (\u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Palindromic_prime\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eWiki\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: 4px 8px; transform-origin: 4px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e, \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://oeis.org/A002385\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eOEIS\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: 4.5px 8px; transform-origin: 4.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e) \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: 0px 8px; transform-origin: 0px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\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: 322.5px 8px; transform-origin: 322.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eIf given a monotonic series (increment=1) or a single number, give the corresonding palindromic prime.\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: 328px 8px; transform-origin: 328px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eElse, if given a random array of numbers, check if the numbers in the array are palindromic prime or not.\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: 98.5px 8px; transform-origin: 98.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eTake base 10 as the reference.\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: 0px 8px; transform-origin: 0px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\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: 26.5px 8px; transform-origin: 26.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eExample\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 163.467px; 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; perspective-origin: 404px 81.7333px; transform-origin: 404px 81.7333px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; 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; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 48px 8.5px; tab-size: 4; transform-origin: 48px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003einput = 2:5;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; 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; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 80px 8.5px; tab-size: 4; transform-origin: 80px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eoutput = [3 5 7 11];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; 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; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; 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; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 44px 8.5px; tab-size: 4; transform-origin: 44px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003einput = 17;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; 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; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 52px 8.5px; tab-size: 4; transform-origin: 52px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eoutput = 787;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; 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; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; 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; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 104px 8.5px; tab-size: 4; transform-origin: 104px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003einput = [7 23 47 11 4 10];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; 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; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 92px 8.5px; tab-size: 4; transform-origin: 92px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eoutput = [1 0 0 1 0 0];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = palinprime(x)\r\n%{Enter your code here%}\r\n\r\n%Stay home, stay safe\r\n%Wear a mask and sanitize\r\n\r\nend","test_suite":"%%\r\nx = 17;\r\ny = 787;\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\nx = [101 111 121 131 141 151];\r\ny = [1 0 0 1 0 1];\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\nx = 1:4;\r\ny = [2, 3, 5, 7];\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\nx = [22, 58, 84, 85, 94, 136, 160];\r\ny = zeros(1,7);\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\n%The only 2 digit palindromic prime\r\nx = 5;\r\ny = 11;\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\nx = [69 420 666];\r\ny = [0 0 0];\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\nx = 11;\r\ny = 313;\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\nx = [363 373 383];\r\ny = [0 1 1];\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\nx = 1;\r\ny = 2;\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\nx = [313, 323, 333, 343, 353];\r\ny = [1 0 0 0 1];\r\nassert(isequal(palinprime(x),y))","published":true,"deleted":false,"likes_count":3,"comments_count":2,"created_by":223089,"edited_by":223089,"edited_at":"2022-06-04T20:18:55.000Z","deleted_by":null,"deleted_at":null,"solvers_count":21,"test_suite_updated_at":"2021-07-15T05:24:43.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2021-07-14T10:18:02.000Z","updated_at":"2026-01-21T12:33:19.000Z","published_at":"2021-07-14T12:33:21.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 Prime is a prime number that is also a palindromic number. (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Palindromic_prime\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eWiki\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\u003cw:hyperlink w:docLocation=\\\"https://oeis.org/A002385\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eOEIS\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\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\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\u003eIf given a monotonic series (increment=1) or a single number, give the corresonding palindromic prime.\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\u003eElse, if given a random array of numbers, check if the numbers in the array are palindromic prime or not.\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\u003eTake base 10 as the reference.\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\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\u003eExample\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[input = 2:5;\\noutput = [3 5 7 11];\\n\\ninput = 17;\\noutput = 787;\\n\\ninput = [7 23 47 11 4 10];\\noutput = [1 0 0 1 0 0];]]\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":42461,"title":"This is a palindrome and so am I","description":"A palindrome is a sequence of characters which reads the same backward or forward, for instance\r\n\r\n'a man a plan a canal panama'\r\n\r\nis a palindrome.\r\nWrite a function that, \r\n\r\n*a)* given a string input, returns true or false depending on whether this string is a palindrome (up to white-spaces) or not.\r\n\r\n*b)* The function's source code must be a palindrome.","description_html":"\u003cp\u003eA palindrome is a sequence of characters which reads the same backward or forward, for instance\u003c/p\u003e\u003cp\u003e'a man a plan a canal panama'\u003c/p\u003e\u003cp\u003eis a palindrome.\r\nWrite a function that,\u003c/p\u003e\u003cp\u003e\u003cb\u003ea)\u003c/b\u003e given a string input, returns true or false depending on whether this string is a palindrome (up to white-spaces) or not.\u003c/p\u003e\u003cp\u003e\u003cb\u003eb)\u003c/b\u003e The function's source code must be a palindrome.\u003c/p\u003e","function_template":"function y = is_pal(s)\r\n% )s(lap_si = y noitcnuf\r\n","test_suite":"%%\r\ns = 'a man a plan a canal panama';\r\nassert(isequal(is_pal(s),true))\r\n%%\r\ns = 'taco cat';\r\nassert(isequal(is_pal(s),true))\r\n%%\r\ns = 'a man a plan  canal panama';\r\nassert(isequal(is_pal(s),false))\r\n%%\r\ns = char(randi(74,1,200)+'0');\r\nassert(isequal(is_pal(s),false)); % most probably\r\n%%\r\ns = char(randi(74,1,200)+'0');\r\ns = [s fliplr(s)];\r\nassert(isequal(is_pal(s),true));\r\n%%\r\ns = fileread('is_pal.m');\r\ns = regexprep(s,'%This code written by profile_id.*','')\r\nassert(isequal(is_pal(s),true));","published":true,"deleted":false,"likes_count":8,"comments_count":5,"created_by":203,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":36,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-07-23T12:29:59.000Z","updated_at":"2025-12-08T18:25:19.000Z","published_at":"2015-07-23T12:30:16.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\u003eA palindrome is a sequence of characters which reads the same backward or forward, for instance\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'a man a plan a canal panama'\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\u003eis a palindrome. Write a function that,\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ea)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e given a string input, returns true or false depending on whether this string is a palindrome (up to white-spaces) or not.\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eb)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e The function's source code must be a palindrome.\u003c/w:t\u003e\u003c/w:r\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":216,"title":"Is this date a palindrome?emordnilap a etad siht sI","description":"Take a MATLAB date number as input, and return true if the date is a palindrome, false if the date is not a palindrome.  A date number is a scalar double representing the decimal days since Jan. 1, 0000 (type \"help datenum\").\r\n\r\nThe date shall be considered a palindrome if the \"mmddyy\" form of the date is a palindrome with leading zeros removed from months and days.  Thus, a date number of 706076 corresponds to March 3, 1933, which can be written 03/03/33.  Then the leading zeros are removed to get \"3333\" --\u003e true.  Date number 695118 corresponds to March 3, 1903, i.e. \"030303\" which reduces to \"3303\" --\u003e false.","description_html":"\u003cp\u003eTake a MATLAB date number as input, and return true if the date is a palindrome, false if the date is not a palindrome.  A date number is a scalar double representing the decimal days since Jan. 1, 0000 (type \"help datenum\").\u003c/p\u003e\u003cp\u003eThe date shall be considered a palindrome if the \"mmddyy\" form of the date is a palindrome with leading zeros removed from months and days.  Thus, a date number of 706076 corresponds to March 3, 1933, which can be written 03/03/33.  Then the leading zeros are removed to get \"3333\" --\u003e true.  Date number 695118 corresponds to March 3, 1903, i.e. \"030303\" which reduces to \"3303\" --\u003e false.\u003c/p\u003e","function_template":"function tf = isPalindrome(d)\r\n  tf = false;\r\nend","test_suite":"%%\r\nd = datenum('01-Jan-2011 02:02:02',0);\r\ntf = true;\r\nassert(isequal(isPalindrome(d),tf))\r\n\r\n%%\r\nd = datenum('02/01/12',2);\r\ntf = true;\r\nassert(isequal(isPalindrome(d),tf))\r\n\r\n%%\r\nd = datenum('12-Nov-1943',1);\r\ntf = false;\r\nassert(isequal(isPalindrome(d),tf))\r\n\r\n%%\r\nd = datenum('10/10/01',2);\r\ntf = false;\r\nassert(isequal(isPalindrome(d),tf))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":1,"created_by":80,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":90,"test_suite_updated_at":"2018-08-30T16:48:29.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-02-01T16:08:32.000Z","updated_at":"2026-01-05T00:09:20.000Z","published_at":"2012-02-01T23:06:32.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\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"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\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\u003eTake a MATLAB date number as input, and return true if the date is a palindrome, false if the date is not a palindrome. A date number is a scalar double representing the decimal days since Jan. 1, 0000 (type \\\"help datenum\\\").\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\u003eThe date shall be considered a palindrome if the \\\"mmddyy\\\" form of the date is a palindrome with leading zeros removed from months and days. Thus, a date number of 706076 corresponds to March 3, 1933, which can be written 03/03/33. Then the leading zeros are removed to get \\\"3333\\\" --\u003e true. Date number 695118 corresponds to March 3, 1903, i.e. \\\"030303\\\" which reduces to \\\"3303\\\" --\u003e false.\u003c/w:t\u003e\u003c/w:r\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":548,"title":"How many palindromes?","description":"* Given a set of letters, count all possible palindromes, using all of those letters.\r\n* For example, if the set is {'A' 'A' 'A'} then the number is 1.\r\n* If the set is {'A 'A' 'B'} then the number is 1.\r\n* If the set is {'A' 'B' 'C'} then the number is 0. ","description_html":"\u003cul\u003e\u003cli\u003eGiven a set of letters, count all possible palindromes, using all of those letters.\u003c/li\u003e\u003cli\u003eFor example, if the set is {'A' 'A' 'A'} then the number is 1.\u003c/li\u003e\u003cli\u003eIf the set is {'A 'A' 'B'} then the number is 1.\u003c/li\u003e\u003cli\u003eIf the set is {'A' 'B' 'C'} then the number is 0.\u003c/li\u003e\u003c/ul\u003e","function_template":"function only = howmany(x)\r\n         only = 1;\r\nend","test_suite":"%%\r\nx={'A' 'A' 'A'};\r\nassert(howmany(x)==1)\r\n\r\n%%\r\nx={'A' 'B' 'C'};\r\nassert(howmany(x)==0)\r\n\r\n%%\r\nx={'A' 'A' 'A' 'A' 'B'};\r\nassert(howmany(x)==1)\r\n\r\n%%\r\nx={'A' 'A' 'A' 'B' 'B'};\r\nassert(howmany(x)==2)\r\n\r\n%%\r\nx={'A' 'A' 'A' 'B' 'B' 'B'};\r\nassert(howmany(x)==0)\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":166,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":29,"test_suite_updated_at":"2012-04-02T04:35:24.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-04-02T03:59:44.000Z","updated_at":"2025-06-28T09:52:36.000Z","published_at":"2012-04-02T04:35:24.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=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eGiven a set of letters, count all possible palindromes, using all of those letters.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFor example, if the set is {'A' 'A' 'A'} then the number is 1.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf the set is {'A 'A' 'B'} then the number is 1.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf the set is {'A' 'B' 'C'} then the number is 0.\u003c/w:t\u003e\u003c/w:r\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":172,"title":"Test if a Number is a Palindrome without using any String Operations","description":"*Description*\r\n\r\nGiven an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits reversed (with no leading 0s). The twist is that your code cannot use any function or variable name that has either \"str\", \"eval\", \"flip\" or \"printf\" in it.\r\n\r\n*Example*\r\n\r\n    X = 123454321;\r\n    Y = true;\r\n\r\n    X = 1234;\r\n    Y = false;","description_html":"\u003cp\u003e\u003cb\u003eDescription\u003c/b\u003e\u003c/p\u003e\u003cp\u003eGiven an integer \u003ci\u003eX\u003c/i\u003e, determine if it is a palindrome number. That is, \u003ci\u003eX\u003c/i\u003e is equal to the \u003ci\u003eX\u003c/i\u003e with the digits reversed (with no leading 0s). The twist is that your code cannot use any function or variable name that has either \"str\", \"eval\", \"flip\" or \"printf\" in it.\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample\u003c/b\u003e\u003c/p\u003e\u003cpre\u003e    X = 123454321;\r\n    Y = true;\u003c/pre\u003e\u003cpre\u003e    X = 1234;\r\n    Y = false;\u003c/pre\u003e","function_template":"function y = isNumPalindrome(x)\r\n  y = true;\r\nend","test_suite":"%%\r\nx = 122131221;\r\ny_correct = true;\r\nassert( isequal(isNumPalindrome(x),y_correct) \u0026\u0026 isempty(regexp(evalc('type isNumPalindrome'),'(str|printf|eval|flip|dec2base)')) )\r\n\r\n%%\r\nx = 1221;\r\ny_correct = true;\r\nassert( isequal(isNumPalindrome(x),y_correct) \u0026\u0026 isempty(regexp(evalc('type isNumPalindrome'),'(str|printf|eval|flip|dec2base)')) )\r\n\r\n%%\r\nx = 12345;\r\ny_correct = false;\r\nassert( isequal(isNumPalindrome(x),y_correct) \u0026\u0026 isempty(regexp(evalc('type isNumPalindrome'),'(str|printf|eval|flip|dec2base)')) )\r\n\r\n%%\r\nx = 9849;\r\ny_correct = false;\r\nassert( isequal(isNumPalindrome(x),y_correct) \u0026\u0026 isempty(regexp(evalc('type isNumPalindrome'),'(str|printf|eval|flip|dec2base)')) )","published":true,"deleted":false,"likes_count":4,"comments_count":2,"created_by":134,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":255,"test_suite_updated_at":"2012-04-18T18:19:32.000Z","rescore_all_solutions":false,"group_id":38,"created_at":"2012-01-30T05:24:23.000Z","updated_at":"2026-03-31T17:41:42.000Z","published_at":"2012-01-30T05:39:05.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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eDescription\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\u003eGiven an integer\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eX\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e, determine if it is a palindrome number. That is,\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eX\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is equal to the\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eX\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e with the digits reversed (with no leading 0s). The twist is that your code cannot use any function or variable name that has either \\\"str\\\", \\\"eval\\\", \\\"flip\\\" or \\\"printf\\\" in it.\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample\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[    X = 123454321;\\n    Y = true;\\n\\n    X = 1234;\\n    Y = false;]]\u003e\u003c/w:t\u003e\u003c/w:r\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\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":50023,"title":"Number Puzzles - 011","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 42px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 21px; transform-origin: 407px 21px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eA number p is a palindrome and is sitting halfway between m^2 and n^2. Give an example of [m n p]. The answer is not unique and, therefore, your answer will be checked against the requirement.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = puzzle_011()\r\n  y = [1 2 3];\r\nend","test_suite":"%%\r\ny=puzzle_011();\r\nassert(isequal((y(1)^2+y(2)^2)/2,y(3)))","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":31,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-28T20:56:02.000Z","updated_at":"2026-01-29T21:31:33.000Z","published_at":"2021-01-28T20:56: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 number p is a palindrome and is sitting halfway between m^2 and n^2. Give an example of [m n p]. The answer is not unique and, therefore, your answer will be checked against the requirement.\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":50018,"title":"Number Puzzles - 010","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eGive an example of fifteen (15) consecutive five-digit numbers whose sum is a palindrome.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = puzzle_010()\r\n  y = 1:15;\r\nend","test_suite":"%%\r\ny=puzzle_010();\r\nassert(isequal(length(num2str(y(1))),5))\r\nassert(isequal(y(15)-y(1)+1,15))\r\nassert(isequal(size(unique(y),2),15))\r\naa=num2str(sum(y));\r\nassert(strcmp(aa,fliplr(aa)))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":27,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-28T01:33:03.000Z","updated_at":"2026-02-25T10:48:18.000Z","published_at":"2021-01-28T01:33:03.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\u003eGive an example of fifteen (15) consecutive five-digit numbers whose sum is a palindrome.\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":50003,"title":"Number Puzzles - 007","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eGive an example of four prime numbers whose product is a palindrome.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = puzzle_007()\r\n  y = [1 2 3 4];\r\nend","test_suite":"%%\r\ny=puzzle_007();\r\nassert(isequal(size(unique(y),2),4))\r\nn=num2str(prod(y))\r\nassert(isequal(n,fliplr(n)))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":33,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-28T00:52:59.000Z","updated_at":"2026-02-25T10:40:33.000Z","published_at":"2021-01-28T00:53:27.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\u003eGive an example of four prime numbers whose product is a palindrome.\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":50013,"title":"Number Puzzles - 009","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eGive an example of ten (10) consecutive four-digit numbers whose sum is a palindrome.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = puzzle_009()\r\n  y = 1:10;\r\nend","test_suite":"%%\r\ny=puzzle_009();\r\nassert(isequal(length(num2str(y(1))),4))\r\nassert(isequal(y(10)-y(1)+1,10))\r\nassert(isequal(size(unique(y),2),10))\r\naa=num2str(sum(y));\r\nassert(strcmp(aa,fliplr(aa)))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":29,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-28T01:29:22.000Z","updated_at":"2026-01-29T20:54:01.000Z","published_at":"2021-01-28T01:29:22.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\u003eGive an example of ten (10) consecutive four-digit numbers whose sum is a palindrome.\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":2276,"title":"Palindrome Check","description":"Check whether the entire matrix is palindrome or not.\r\n\r\nExample\r\n\r\n matrix = [7 8 7]\r\n\r\n matrix_reverse = [7 8 7]\r\n\r\nSo the matrix is palindrome.","description_html":"\u003cp\u003eCheck whether the entire matrix is palindrome or not.\u003c/p\u003e\u003cp\u003eExample\u003c/p\u003e\u003cpre\u003e matrix = [7 8 7]\u003c/pre\u003e\u003cpre\u003e matrix_reverse = [7 8 7]\u003c/pre\u003e\u003cp\u003eSo the matrix is palindrome.\u003c/p\u003e","function_template":"function y = mat_palin(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = [1 9 0 7 4];\r\ny_correct = 0;\r\nassert(isequal(mat_palin(x),y_correct))\r\n\r\n%%\r\nx = [-2 9 0 9 -2];\r\ny_correct = 1;\r\nassert(isequal(mat_palin(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":22816,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":169,"test_suite_updated_at":"2014-04-09T05:15:56.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-04-09T05:11:28.000Z","updated_at":"2026-03-02T09:06:28.000Z","published_at":"2014-04-09T05:11:28.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\u003eCheck whether the entire matrix is palindrome or not.\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\u003eExample\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[ matrix = [7 8 7]\\n\\n matrix_reverse = [7 8 7]]]\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSo the matrix is palindrome.\u003c/w:t\u003e\u003c/w:r\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":50028,"title":"Number Puzzles - 012","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 42px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 21px; transform-origin: 407px 21px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eA number p is a palindrome and is sitting halfway between m^3 and n^3. Give an example of [m n p]. The answer is not unique and, therefore, your answer will be checked against the requirement.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = puzzle_012()\r\n  y = [1 2 3];\r\nend","test_suite":"%%\r\ny=puzzle_012();\r\nassert(isequal((y(1)^3+y(2)^3)/2,y(3)))\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":28,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-28T20:59:53.000Z","updated_at":"2026-01-29T21:32:07.000Z","published_at":"2021-01-28T20:59: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\u003eA number p is a palindrome and is sitting halfway between m^3 and n^3. Give an example of [m n p]. The answer is not unique and, therefore, your answer will be checked against the requirement.\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":54285,"title":"Palindrome Problem 1","description":"Continued Problem 50033: A palindrome  is one-thirteenth of the sum of  and , where  and  are also palindrome. Give an example of . ","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 43.9px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 331.5px 21.95px; transform-origin: 331.5px 21.95px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 308.5px 21.95px; text-align: left; transform-origin: 308.5px 21.95px; 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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eContinued Problem 50033: A palindrome \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003ep\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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is one-thirteenth of the sum of \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAtCAYAAADcMyneAAAAAXNSR0IArs4c6QAAA05JREFUWEft2FvIbVMYBuBnIyWnhAsUEUnkkLBFkTaRnMmZ4gI57NDeOct248ax5OyCnCLHG3HDxaZdXCAhSsohKcohEdGrb2iazf/3/2ux1n+xRq3Wao455nzH+33f+71jLbPEx7Iljs8M4LgRmjE4Y3BcBnrrN8Y5OBcH4Fu8gDvxLv7ov2+SObgZbsfxeAcbYXkB+qxAvz4tgCHiMuyOa/FNAdkJd+FoPIfz8V0X5KQY3AZ34AZ81GNpfzxf147B29MAuA/2wwMDebY1HscKHIy10wA4X61ticewFU7DJ0sN4K54CimQ1fhlqQE8EbfhzH54A3RSRTJXiLfAfVUYt+K3acnMEMANcCW2r9D+NHTTtBjMe0/HIbi6Osogy9MCGGAR5VX4er4SnwbAgLsIKwfAbY4NO51m4kVyIC6odvdFj7n05ivwUhmHv6YnyeC+uLvPUAfkDngTl+DvgpkUwF3waFms+VLuJDz7b0KdHNgOeyO7jiWK0qeProfDcBXS5HMtBiA7zmbTczN3JJ6u3825jGQthxjcDdnxxTgCXyEu40NcU6AjqLFIP9Q9b1UnuBTvIUxsiuPw4kjIatFcIc71G+vzTFXdefgZ91eo0js/xsnYo6NpcSdhfK//E2B2n4Q+u0L4Kbatnhn2Uon34mU8jINwfTF6OF4p13zqgP9bFKFzMbgznqxwxvH+XgCSa8nRW3B5Jf6PuKk0Lc+LY7655pImSYORx1wAGwt5eEo/4W26FSbj3w5F/yzRZT6aljPIWGMIYJeFAEyYc/JqI5UdMY2NT1jDZnMhzdvlrHHUkH1aLNohgLFAD+EEPIJU5vedB7f8+wCn4P3O3LG1mdeqqr9cLKCF2K0uQ2dVONu6tKOELSDzHc37tSbXr9yLO+nPjYxziMHG0LqyRKngNnbEEyUz0chXO3Np9A+W7GRjOQglTz8vORoJZB9gl6FUb/+M0EL4Bs6oImkv3hPRzE1K2POd+68r/fxPALYkj8j2+2I3hLHpkZkIdxsNfMQ7bS5/c6yZz4wuBHGfwfaS/DXRF9lUbYom59cL6yzRfUdyN/KTcU+Fe9DGLwRYu2dSbmYxmP5x7wzgyNTVwhmDMwbHZWDc9bMcHJfBPwHsq6kuL3/DIwAAAABJRU5ErkJggg==\" width=\"20\" height=\"22.5\" style=\"width: 20px; height: 22.5px;\"\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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e and \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAtCAYAAAAgJgIUAAAAAXNSR0IArs4c6QAAArtJREFUWEft11uozWkYx/HPRoRcOYQbh2hSikYxuKBkcuHYKIcc0hBuyJBTIYfBFTlNXGqcb4QLcrggF7iimUxuHEqNEc0FknLqqfe/2/3917b3sv/stN6btVbrXev9vs/z/J7n96/TClZdK2BQg8iyUIvEdx+JDpiIpRiHF7iCvbiK93lFtnRNBMAarMLtdNhQdEkwS3AcHxqCtDTEFCzEctxPB3XH71iEm5iFB2VBdMZuHMG1XMj7pQiMQICeLQuiL37BfrzJQXTCnhSlOThaFkRjE6BjitJs/Iwb3wKiG/7Ea/yK/78FxHCcwlqcKFuiRSkJ2YY6IiWr8eprQ0QLCElOT83rvyLKlu4T+TPGYBl+w6NKlVsmxCBsw3rca0w6ZUEEwA6swz85gKiNrnhc5hQdiE3Yib9zAO2wAA9xqSyIPjiAARVqIObIc8zDv2VAxAGHMO0z5nll6p71k7SoJiJkPTEYP2Jk8gPR+2N/VvHhFS6nsZ1NzKrMexFEhHQCZmJsCttU/IW4xWg8TSGNQ0N+MT2rXo2pYwO24EIqpvlog12IiXkSQxBGJdJQ9aoEEU4oCmwuNiYT0jsBvMVPuIiXiCjdqpog5bjo9z+km/ZPB8druKVs+kV1H05RCtBnZUBMxpnkC++mdGRNp33qASuwFZvxrqUh2qY/j24XK24aTiiTVKQlPkfRhkGpbzrVghTVRGZAQiGnC0xIqON8Uks4pYqDqalQRRDDcA698IkfRKQhFBKKiPfhlr5oFUEsxsEK9ryhajJpBnQY2/ycaDJYHiIzpAEST0zhhBo650w1PTApfRemZXuRY2oqRR4iuuUxjKqQiqiH66mL/pEGVTxxFTqmaiHGpyZ0BzMKzEgMqX2IfWFcQ55PmnpYpX1lmZpmcdUgyjA1zUpBw821dNTSkS+eVlETHwGnQ4IudpkxZgAAAABJRU5ErkJggg==\" width=\"16.5\" height=\"22.5\" style=\"width: 16.5px; height: 22.5px;\"\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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e, where \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003em\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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e and \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003en\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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e are also palindrome. Give an example of \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAG0AAAAkCAYAAACDr7TyAAAAAXNSR0IArs4c6QAAB1RJREFUaEPtmnXIrVUWh5/rqDP22BhYjNgtdncrBmMHKhY2dndg1yjOoGK3o3/YiY0tIjKDYisWdgcPrC2bc877vvv9zrn3+snZcBE5+91r7RW/9Vtrf2MYrlFngTGjTuOhwgydNgqDoK3TJgFWBB4BvhuF9/2jqTwBsCrwPPBpqXJtnDY9cCRwMfBqqYDhvkYLzAIcCJwLvNm4G4rhcUbgWOC8ocNKzNp6j/Y9pNRxJZkmJJ4GPAlcC/zaWqXhByUWWB7YEjgU+LrugxKnedAqkcK1h5VoNtxTaYG/AAcD3wSiVSZHk9NmAi4FTg/yMbT52LXAnMC/IkFeqRLV5LSdgZWBvYAvx66+w9MBs+0E4CfgOODnXlapc9pUwL+B+4BLhiYdZxZYMxy3FfBGW6ctAdwcxVESMlzjxgL/AK4Djgdub+u03YDtga1L+4dxc6c/vZSEcNY0IbKLkFTBY8LWuYFdgM//9KYa3AWdckwRtN3apI2nBCYMXvBDg6iJgVOB6aq4RJXTJo1Gz0K4P/BtjSD7uDmAxYBFY8x1NHAv8FdgU2BfwAA4Keisl/Fyq0VfslTIU9mRthVe1umCOgjtywAXAreGHhsAewDKugY4AvhkAL7yjhsCmwDzhx0eAnYAlgT2C5soylGVUyUZuTaoWkcBKwXKfdS5qcpp0wJXA88BHtCTxQTbWQiYN4y/CPB4CLPfOBOYHJg6er1no0a+G7R2DeA9wKL7flzePSNZCwIWcY2lHk/FuaKEjMwx3ERhXM/fuKpmjEQ48PcY8f0TuDwc5J3+E3PagwLuZOHbAf+tkXMY4Dn+e62t0x6LCzfdI2WmUHp2fKOznwgysy1wBZAiUCf9Lfq/xYFHB+A0dTTrlW89lvGqwzExzTG7lg1Z7l0r0KDpbqW/zxyB7iDCGeLhHROkhYGbAnFOaUiGbQCdPFadliu8I+As7Z1QWhg00o0eYeGZyLxzgO/DwA6h74oI/LjUSj321elhQdcIMrOUhT0p9QjlO4a6M+qZwSLU5xA4D3B9oIABVVd2+nJaEzym+1k/7gHEXxV/CzgrlE5saHPgoqhZsiJrV54ZTdFXYstkuNdDD4u/NcTgsBSYdf5rMlqJrM49OsE7+wKyBdA50bCE3ABYTpruqtOFb0eI/y+FxzZExDOFI7NFvL4xouiLEJbDghG+U/ZSkGfGIGpMMpx6PADsDnwQeuTBI4xbawa1ZIuSHmtVVUBILB4OgepVN7DQaQagGddFlgZB+fNsEcvNKCEwrY2youulJDip98gzoyd+t7BqbjgJgHVUx6WVgsf/V8eXWpzdtHX2YKTLhVzvmC/tbEBJzKoyMe1P9rTtknVL6LoOq1JIL+9Z0Fw75PTJZmng5ICfhOWp37OeOQ6zWdegaaXMuHIA8828Zvju58RcWEzL+1wVZGDQvaes1fJQ5ZAZop4bwDrOdiPXLfeBTFt7SAKF0a5VN3s0Mi3au8YBVc5NmSQkrdux1wZRBdYBDghml87JM6Pzt6bI7vV7nR6pYTVIhB77xUG9C2pDnSDZqgq+FDAvRhtS9/Kf7L43cH9bp00GXAC8HMbudck8k2xifRX4LBNkI3sb8FUPSEqQYmHW2da79aJNkNDIOq1DP8b3dY5s0iOvnVJ9s15qbpF/Ow4WlmxDDL66xrdTj7xWSvM7s2M+4LJovK1lTQ/JOlgG3olKv8tteppxmmFt6HRGOiDPJP/OwR4pd26CP/uTTkhKkGIzrqLWA9/vbAXUy/OkzRrRKPbsKmM26ZFqpwGorLmCep8fZybDCvHCkvftamoroiYnWp1kyoZeqF4/So294i810ZcS5YW6h9Amp4mvPsoZHb06+GQMM8kxztOZQjn89YKk5FAzzKbbM8R7R2ZpIrN2nCes1BEVx1Z3xPSlE6I9IocnXy68lzqlkVn6PanfBkLzb3179C/VXI72rPFO7f0TggcLIFlksh0ywJ0a9VxNTvMjFTHyZDI59PlbMnyvxniBoP9Gca/pg/M6xz3/i7njLVlxtr/aJ2rFNKH5CjW1NbUcVQ26hlPWrPFfgyN/1JXESNlXD1mlfVxeKw0s2bPZ7AxUqDXQDaaSearwbJ9nWyCXqFwlTrNeSBRcHlo1h6yT089vQoy11SF0KWT1I89aMlshWVE3Ic8Zaq96VqqHfnC059A9DQP6cpofGwVOq4WykjQvVbZkny8BNqYntiQIJWd37rGmKEfiUNLHJVi2Fvczy/Qc+UOq4bW6l2RaOkDHSUO9zN0F+DwSo3V+I7RKSKTUHw7iwJozhGQRJc1MS1qCBMvp9aJr5FSgsw6zXTmj9O9w2jhN+dJwC6yzxTa0uED3ri1ChZML2WTXm9JIDqz5xvpjDbUeGZB1DC8P4vSiMNLhgKVHJqs9q5rtLrXbOm3AthrVx6UmWDQQUh1Elzi770sPndbehD6kbhaTfB94XQ4ALBuyvpJa2F5q9sXQaX2Zb/x8PHTa+LF7X1KHTuvLfOPn498AiO7PNNx85rYAAAAASUVORK5CYII=\" width=\"54.5\" height=\"18\" style=\"width: 54.5px; height: 18px;\"\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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = pp1()\r\n  y = [m,n,p];\r\nend","test_suite":"%%\r\ny = pp1();\r\nassert(all(y\u003e0));\r\nassert( isequal(y(1)^2+y(2)^2,13*y(3)) );\r\nyy1 = num2str(y(1));\r\nassert( all(yy1==fliplr(yy1)) )\r\nyy2 = num2str(y(2));\r\nassert( all(yy2==fliplr(yy2)) )\r\nyy3 = num2str(y(3));\r\nassert( all(yy3==fliplr(yy3)) )\r\n\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":3,"created_by":2197980,"edited_by":2197980,"edited_at":"2022-04-20T06:54:09.000Z","deleted_by":null,"deleted_at":null,"solvers_count":14,"test_suite_updated_at":"2022-04-20T06:54:09.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2022-04-14T03:21:34.000Z","updated_at":"2026-03-02T14:10:46.000Z","published_at":"2022-04-14T03:21:34.000Z","restored_at":null,"restored_by":null,"spam":null,"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\u003eContinued Problem 50033: A palindrome \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ep\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is one-thirteenth of the sum of \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003em^2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e and \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003en^2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e, where \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003em\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e and \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e are also palindrome. Give an example of \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e(m,n,p)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\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":50033,"title":"Number Puzzles - 013","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 63px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 31.5px; transform-origin: 407px 31.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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 31.5px; text-align: left; transform-origin: 384px 31.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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThirteen is a special and supposedly scarry number. So, let's use it in this problem. A palindrome p is \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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eone-thirteenth\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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e of the sum of m^2 and n^2. Give an example of [m n p]. Note that the answer is not unique; so, your answer will simply be tested against the requirement.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = puzzle_013()\r\n  y = [13 13 13];\r\nend","test_suite":"%%\r\ny=puzzle_013();\r\nassert(isequal(y(1)^2+y(2)^2,13*y(3)))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":28,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-29T00:36:49.000Z","updated_at":"2026-01-29T21:33:19.000Z","published_at":"2021-01-29T00:36:49.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\u003eThirteen is a special and supposedly scarry number. So, let's use it in this problem. A palindrome p is \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eone-thirteenth\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e of the sum of m^2 and n^2. Give an example of [m n p]. Note that the answer is not unique; so, your answer will simply be tested against the requirement.\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":2275,"title":"Palindrome numbers","description":"Find the palindrome numbers (two or more digits) from 1 to n where n is the number passed to the function.","description_html":"\u003cp\u003eFind the palindrome numbers (two or more digits) from 1 to n where n is the number passed to the function.\u003c/p\u003e","function_template":"function y = palin(n)\r\n  y = x;\r\nend","test_suite":"%%\r\nn = 100;\r\ny_correct = [11 22 33 44 55 66 77 88 99]; \r\nassert(isequal(palin(n),y_correct))\r\n\r\n%%\r\nfor n = 101:110\r\n y_correct = [11 22 33 44 55 66 77 88 99 101]; \r\n assert(isequal(palin(n),y_correct))\r\nend\r\n\r\n%%\r\nn = 200;\r\ny_correct = [11 22 33 44 55 66 77 88 99 101 111 121 131 141 151 161 171 181 191]; \r\nassert(isequal(palin(n),y_correct))\r\n\r\n%%\r\nn = 300;\r\ny_correct = [11 22 33 44 55 66 77 88 99 101 111 121 131 141 151 161 171 181 191 202 212 222 232 242 252 262 272 282 292];\r\nassert(isequal(palin(n),y_correct))\r\n\r\n%%\r\nn = 400;\r\ny_correct = [11 22 33 44 55 66 77 88 99 101 111 121 131 141 151 161 171 181 191 202 212 222 232 242 252 262 272 282 292 303 313 323 333 343 353 363 373 383 393];\r\nassert(isequal(palin(n),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":3,"created_by":22816,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":73,"test_suite_updated_at":"2018-08-30T16:46:25.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-04-09T05:09:16.000Z","updated_at":"2025-11-21T16:32:11.000Z","published_at":"2014-04-09T05:09:16.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\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"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\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 palindrome numbers (two or more digits) from 1 to n where n is the number passed to the function.\u003c/w:t\u003e\u003c/w:r\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":49958,"title":"Previous Palindrome","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eGiven a number (num), determine three palindromes which come immediately before the given number.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = previous_palindrome(num)\r\n  y = num;\r\nend","test_suite":"%%\r\nnum=123;\r\ny=previous_palindrome(num);\r\ny_correct=[121 111 101];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=5221;\r\ny=previous_palindrome(num);\r\ny_correct=[5115 5005 4994];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=7031;\r\ny=previous_palindrome(num);\r\ny_correct=[7007 6996 6886];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=4141;\r\ny=previous_palindrome(num);\r\ny_correct=[4114 4004 3993];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=97627;\r\ny=previous_palindrome(num);\r\ny_correct=[97579 97479 97379];\r\nassert(isequal(y,y_correct))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":25,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-22T23:32:23.000Z","updated_at":"2026-03-13T18:57:41.000Z","published_at":"2021-01-22T23:34:03.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\u003eGiven a number (num), determine three palindromes which come immediately before the given number.\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":49953,"title":"Next Palindrome","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eGiven a number (num), find the next three palindromes that come immediately after this number.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = next_palindrome(num)\r\n  y = [11 111 1111];\r\nend","test_suite":"%%\r\nnum=11;\r\ny=next_palindrome(num);\r\ny_correct=[22 33 44];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=9909;\r\ny=next_palindrome(num);\r\ny_correct=[9999 10001 10101];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=734535;\r\ny=next_palindrome(num);\r\ny_correct=[735537 736637 737737];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=1234321;\r\ny=next_palindrome(num);\r\ny_correct=[1235321 1236321 1237321];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=6417;\r\ny=next_palindrome(num);\r\ny_correct=[6446 6556 6666];\r\nassert(isequal(y,y_correct))\r\n%%\r\nnum=123;\r\ny=next_palindrome(num);\r\ny_correct=[131 141 151];\r\nassert(isequal(y,y_correct))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":26,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-22T23:22:24.000Z","updated_at":"2026-02-25T10:54:16.000Z","published_at":"2021-01-22T23:22:59.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\u003eGiven a number (num), find the next three palindromes that come immediately after this number.\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":50008,"title":"Number Puzzles - 008","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eGive an example of five prime numbers whose product is a palindrome.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = puzzle_008()\r\n  y = [1 2 3 4 5];\r\nend","test_suite":"%%\r\ny=puzzle_008();\r\nassert(isequal(size(unique(y),2),5))\r\nn=num2str(prod(y))\r\nassert(isequal(n,fliplr(n)))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":29,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-28T01:02:08.000Z","updated_at":"2026-03-17T07:45:10.000Z","published_at":"2021-01-28T01:02:08.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\u003eGive an example of five prime numbers whose product is a palindrome.\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":44512,"title":"Find if a given sentence is a palindrome","description":"Given a string/character array, return true if the string is a palindrome else returns false.\r\n\r\nFor example:\r\n\r\n  sample_text = \"Sore was I ere I saw Eros.\";\r\n  isPalindrome(sample_text);\r\n  ans =\r\n        True \r\n","description_html":"\u003cp\u003eGiven a string/character array, return true if the string is a palindrome else returns false.\u003c/p\u003e\u003cp\u003eFor example:\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003esample_text = \"Sore was I ere I saw Eros.\";\r\nisPalindrome(sample_text);\r\nans =\r\n      True \r\n\u003c/pre\u003e","function_template":"function y = isPalindrome(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = \"Nella's simple hymn: \"\"I attain my help, Miss Allen.\";\r\ny_correct = true;\r\nassert(isequal(isPalindrome(x),y_correct))\r\n\r\n%%\r\nx = \"Deliver desserts,\"\" demanded Nemesis, \"\"emended, named, stressed, reviled.\";\r\ny_correct = true;\r\nassert(isequal(isPalindrome(x),y_correct))\r\n\r\n%%\r\nx = \"Dennis danced\";\r\ny_correct = false;\r\nassert(isequal(isPalindrome(x),y_correct))\r\n\r\n%%\r\nx = \"Fred ate bread\";\r\ny_correct = false;\r\nassert(isequal(isPalindrome(x),y_correct))","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":132561,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":35,"test_suite_updated_at":"2018-02-07T10:05:57.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2018-02-05T11:44:20.000Z","updated_at":"2026-03-24T12:04:28.000Z","published_at":"2018-02-05T11:44:28.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\u003eGiven a string/character array, return true if the string is a palindrome else returns false.\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\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[sample_text = \\\"Sore was I ere I saw Eros.\\\";\\nisPalindrome(sample_text);\\nans =\\n      True]]\u003e\u003c/w:t\u003e\u003c/w:r\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":45663,"title":"Find the next binary palindrome number","description":"We all know, a *palindrome* is nothing but a number or character which remains the same after the forward or backward alteration of order. *202 or \"Mom\"* is the best example of a palindrome which remains the same as before, after the backward or forward alteration done.\r\n \r\nHowever, the problem is: how will you accomplish the task of *finding the next binary palindrome in an integer form as output* when you are given *a positive integer as input*.\r\n\r\n*Example: Input=2014 and Output=2015*","description_html":"\u003cp\u003eWe all know, a \u003cb\u003epalindrome\u003c/b\u003e is nothing but a number or character which remains the same after the forward or backward alteration of order. \u003cb\u003e202 or \"Mom\"\u003c/b\u003e is the best example of a palindrome which remains the same as before, after the backward or forward alteration done.\u003c/p\u003e\u003cp\u003eHowever, the problem is: how will you accomplish the task of \u003cb\u003efinding the next binary palindrome in an integer form as output\u003c/b\u003e when you are given \u003cb\u003ea positive integer as input\u003c/b\u003e.\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample: Input=2014 and Output=2015\u003c/b\u003e\u003c/p\u003e","function_template":"function y=NextBinaryPalindrome(x)\r\n y = x;\r\nend","test_suite":"%%\r\nx = 241;\r\ny_correct = 255;\r\nassert(isequal(NextBinaryPalindrome(x),y_correct))\r\n%%\r\nx = 2020;\r\ny_correct = 2047;\r\nassert(isequal(NextBinaryPalindrome(x),y_correct))\r\n%%\r\nx = 10051;\r\ny_correct =10233;\r\nassert(isequal(NextBinaryPalindrome(x),y_correct))\r\n%%\r\nx =40504;\r\ny_correct =40569;\r\nassert(isequal(NextBinaryPalindrome(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":430818,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":27,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2020-05-28T19:29:50.000Z","updated_at":"2020-05-28T19:41:28.000Z","published_at":"2020-05-28T19:41:28.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\u003eWe all know, a\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003epalindrome\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is nothing but a number or character which remains the same after the forward or backward alteration of order.\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e202 or \\\"Mom\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is the best example of a palindrome which remains the same as before, after the backward or forward alteration done.\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\u003eHowever, the problem is: how will you accomplish the task of\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003efinding the next binary palindrome in an integer form as output\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e when you are given\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ea positive integer as input\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample: Input=2014 and Output=2015\u003c/w:t\u003e\u003c/w:r\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":49998,"title":"Number Puzzles - 006","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; 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=\"block-size: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eGive an example of three prime numbers whose product is a palindrome.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = puzzle_006()\r\n  y = [1 2 3];\r\nend","test_suite":"%%\r\ny=puzzle_006();\r\nassert(isequal(size(unique(y),2),3))\r\nn=num2str(prod(y));\r\nassert(isequal(n,fliplr(n)))","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":180632,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":38,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-01-27T23:18:52.000Z","updated_at":"2026-03-30T19:12:37.000Z","published_at":"2021-01-27T23:20:27.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\u003eGive an example of three prime numbers whose product is a palindrome.\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":2055,"title":"Create numeric palindromes and their square roots","description":"Given a number n (1\u003c=n\u003c=9), return a left justified numeric matrix p with all the palindromes of the form 1 to n and back to 1. Use 0 for empty values. Similarly return the square root matrix in the same form.\r\n\r\nExample\r\n\r\n n=2;\r\n\r\n p=[1 0 0; 1 2 1];\r\n\r\n r=[1 0 0; 1 1 0];","description_html":"\u003cp\u003eGiven a number n (1\u0026lt;=n\u0026lt;=9), return a left justified numeric matrix p with all the palindromes of the form 1 to n and back to 1. Use 0 for empty values. Similarly return the square root matrix in the same form.\u003c/p\u003e\u003cp\u003eExample\u003c/p\u003e\u003cpre\u003e n=2;\u003c/pre\u003e\u003cpre\u003e p=[1 0 0; 1 2 1];\u003c/pre\u003e\u003cpre\u003e r=[1 0 0; 1 1 0];\u003c/pre\u003e","function_template":"function [p,r] = palinroot(n)\r\np=[1 0 0; 1 2 1];\r\nr=sqrt(p);\r\nend","test_suite":"%%\r\nn=3;\r\n[p,r]=palinroot(n);\r\ny_correct=[1 0 0 0 0; 1 2 1 0 0; 1 2 3 2 1];\r\nz_correct=[1 0 0; 1 1 0; 1 1 1];\r\nassert(isequal(p,y_correct))\r\nassert(isequal(r,z_correct))\r\n\r\n\r\n%%\r\nn=9;\r\n[p,r]=palinroot(n);\r\n\r\nrr=1;\r\nfor s1=2:n\r\n    rr(s1)=rr(s1-1)*10+1;\r\nend\r\nrr=num2str(rr','%.0f');\r\nz_correct=tril(fliplr(rr)-'0');\r\n\r\npp=zeros(n,n*2-1);\r\nfor s=1:n\r\n    p1=1:s;\r\n    p2=fliplr(p1);\r\n    st=deal([p1,p2(2:end)]);\r\n    pp(s,1:numel(st))=st;\r\nend\r\ny_correct=pp;\r\n\r\nassert(isequal(p,y_correct))\r\nassert(isequal(r,z_correct))\r\n\r\n%%\r\nn=5;\r\n[p,r]=palinroot(n);\r\n\r\nrr=1;\r\nfor s1=2:n\r\n    rr(s1)=rr(s1-1)*10+1;\r\nend\r\nrr=num2str(rr','%.0f');\r\nz_correct=tril(fliplr(rr)-'0');\r\n\r\npp=zeros(n,n*2-1);\r\nfor s=1:n\r\n    p1=1:s;\r\n    p2=fliplr(p1);\r\n    st=deal([p1,p2(2:end)]);\r\n    pp(s,1:numel(st))=st;\r\nend\r\ny_correct=pp;\r\n\r\nassert(isequal(p,y_correct))\r\nassert(isequal(r,z_correct))\r\n\r\n%%\r\nn=7;\r\n[p,r]=palinroot(n);\r\n\r\nrr=1;\r\nfor s1=2:n\r\n    rr(s1)=rr(s1-1)*10+1;\r\nend\r\nrr=num2str(rr','%.0f');\r\nz_correct=tril(fliplr(rr)-'0');\r\n\r\npp=zeros(n,n*2-1);\r\nfor s=1:n\r\n    p1=1:s;\r\n    p2=fliplr(p1);\r\n    st=deal([p1,p2(2:end)]);\r\n    pp(s,1:numel(st))=st;\r\nend\r\ny_correct=pp;\r\n\r\nassert(isequal(p,y_correct))\r\nassert(isequal(r,z_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":17471,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":25,"test_suite_updated_at":"2013-12-15T11:05:10.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-12-15T09:35:00.000Z","updated_at":"2026-01-02T17:16:23.000Z","published_at":"2013-12-15T10:36:26.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\u003eGiven a number n (1\u0026lt;=n\u0026lt;=9), return a left justified numeric matrix p with all the palindromes of the form 1 to n and back to 1. Use 0 for empty values. Similarly return the square root matrix in the same form.\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\u003eExample\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[ n=2;\\n\\n p=[1 0 0; 1 2 1];\\n\\n r=[1 0 0; 1 1 0];]]\u003e\u003c/w:t\u003e\u003c/w:r\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":52293,"title":"Palindromic Primes","description":"A Palindromic Prime is a prime number that is also a palindromic number. (Wiki, OEIS) \r\n\r\nIf given a monotonic series (increment=1) or a single number, give the corresonding palindromic prime.\r\nElse, if given a random array of numbers, check if the numbers in the array are palindromic prime or not.\r\nTake base 10 as the reference.\r\n\r\nExample\r\ninput = 2:5;\r\noutput = [3 5 7 11];\r\n\r\ninput = 17;\r\noutput = 787;\r\n\r\ninput = [7 23 47 11 4 10];\r\noutput = [1 0 0 1 0 0];","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: 374.467px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 187.233px; transform-origin: 407px 187.233px; 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: 233.5px 8px; transform-origin: 233.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA Palindromic Prime is a prime number that is also a palindromic number. (\u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Palindromic_prime\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eWiki\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: 4px 8px; transform-origin: 4px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e, \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://oeis.org/A002385\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eOEIS\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: 4.5px 8px; transform-origin: 4.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e) \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: 0px 8px; transform-origin: 0px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\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: 322.5px 8px; transform-origin: 322.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eIf given a monotonic series (increment=1) or a single number, give the corresonding palindromic prime.\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: 328px 8px; transform-origin: 328px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eElse, if given a random array of numbers, check if the numbers in the array are palindromic prime or not.\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: 98.5px 8px; transform-origin: 98.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eTake base 10 as the reference.\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: 0px 8px; transform-origin: 0px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\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: 26.5px 8px; transform-origin: 26.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eExample\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 163.467px; 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; perspective-origin: 404px 81.7333px; transform-origin: 404px 81.7333px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; 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; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 48px 8.5px; tab-size: 4; transform-origin: 48px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003einput = 2:5;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; 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; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 80px 8.5px; tab-size: 4; transform-origin: 80px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eoutput = [3 5 7 11];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; 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; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; 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; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 44px 8.5px; tab-size: 4; transform-origin: 44px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003einput = 17;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; 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; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 52px 8.5px; tab-size: 4; transform-origin: 52px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eoutput = 787;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; 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; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; 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; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 104px 8.5px; tab-size: 4; transform-origin: 104px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003einput = [7 23 47 11 4 10];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; 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; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 92px 8.5px; tab-size: 4; transform-origin: 92px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eoutput = [1 0 0 1 0 0];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = palinprime(x)\r\n%{Enter your code here%}\r\n\r\n%Stay home, stay safe\r\n%Wear a mask and sanitize\r\n\r\nend","test_suite":"%%\r\nx = 17;\r\ny = 787;\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\nx = [101 111 121 131 141 151];\r\ny = [1 0 0 1 0 1];\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\nx = 1:4;\r\ny = [2, 3, 5, 7];\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\nx = [22, 58, 84, 85, 94, 136, 160];\r\ny = zeros(1,7);\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\n%The only 2 digit palindromic prime\r\nx = 5;\r\ny = 11;\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\nx = [69 420 666];\r\ny = [0 0 0];\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\nx = 11;\r\ny = 313;\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\nx = [363 373 383];\r\ny = [0 1 1];\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\nx = 1;\r\ny = 2;\r\nassert(isequal(palinprime(x),y))\r\n\r\n%%\r\nx = [313, 323, 333, 343, 353];\r\ny = [1 0 0 0 1];\r\nassert(isequal(palinprime(x),y))","published":true,"deleted":false,"likes_count":3,"comments_count":2,"created_by":223089,"edited_by":223089,"edited_at":"2022-06-04T20:18:55.000Z","deleted_by":null,"deleted_at":null,"solvers_count":21,"test_suite_updated_at":"2021-07-15T05:24:43.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2021-07-14T10:18:02.000Z","updated_at":"2026-01-21T12:33:19.000Z","published_at":"2021-07-14T12:33:21.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 Prime is a prime number that is also a palindromic number. (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Palindromic_prime\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eWiki\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\u003cw:hyperlink w:docLocation=\\\"https://oeis.org/A002385\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eOEIS\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\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\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\u003eIf given a monotonic series (increment=1) or a single number, give the corresonding palindromic prime.\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\u003eElse, if given a random array of numbers, check if the numbers in the array are palindromic prime or not.\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\u003eTake base 10 as the reference.\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\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\u003eExample\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[input = 2:5;\\noutput = [3 5 7 11];\\n\\ninput = 17;\\noutput = 787;\\n\\ninput = [7 23 47 11 4 10];\\noutput = [1 0 0 1 0 0];]]\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":42461,"title":"This is a palindrome and so am I","description":"A palindrome is a sequence of characters which reads the same backward or forward, for instance\r\n\r\n'a man a plan a canal panama'\r\n\r\nis a palindrome.\r\nWrite a function that, \r\n\r\n*a)* given a string input, returns true or false depending on whether this string is a palindrome (up to white-spaces) or not.\r\n\r\n*b)* The function's source code must be a palindrome.","description_html":"\u003cp\u003eA palindrome is a sequence of characters which reads the same backward or forward, for instance\u003c/p\u003e\u003cp\u003e'a man a plan a canal panama'\u003c/p\u003e\u003cp\u003eis a palindrome.\r\nWrite a function that,\u003c/p\u003e\u003cp\u003e\u003cb\u003ea)\u003c/b\u003e given a string input, returns true or false depending on whether this string is a palindrome (up to white-spaces) or not.\u003c/p\u003e\u003cp\u003e\u003cb\u003eb)\u003c/b\u003e The function's source code must be a palindrome.\u003c/p\u003e","function_template":"function y = is_pal(s)\r\n% )s(lap_si = y noitcnuf\r\n","test_suite":"%%\r\ns = 'a man a plan a canal panama';\r\nassert(isequal(is_pal(s),true))\r\n%%\r\ns = 'taco cat';\r\nassert(isequal(is_pal(s),true))\r\n%%\r\ns = 'a man a plan  canal panama';\r\nassert(isequal(is_pal(s),false))\r\n%%\r\ns = char(randi(74,1,200)+'0');\r\nassert(isequal(is_pal(s),false)); % most probably\r\n%%\r\ns = char(randi(74,1,200)+'0');\r\ns = [s fliplr(s)];\r\nassert(isequal(is_pal(s),true));\r\n%%\r\ns = fileread('is_pal.m');\r\ns = regexprep(s,'%This code written by profile_id.*','')\r\nassert(isequal(is_pal(s),true));","published":true,"deleted":false,"likes_count":8,"comments_count":5,"created_by":203,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":36,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-07-23T12:29:59.000Z","updated_at":"2025-12-08T18:25:19.000Z","published_at":"2015-07-23T12:30:16.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\u003eA palindrome is a sequence of characters which reads the same backward or forward, for instance\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'a man a plan a canal panama'\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\u003eis a palindrome. Write a function that,\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ea)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e given a string input, returns true or false depending on whether this string is a palindrome (up to white-spaces) or not.\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eb)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e The function's source code must be a palindrome.\u003c/w:t\u003e\u003c/w:r\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":216,"title":"Is this date a palindrome?emordnilap a etad siht sI","description":"Take a MATLAB date number as input, and return true if the date is a palindrome, false if the date is not a palindrome.  A date number is a scalar double representing the decimal days since Jan. 1, 0000 (type \"help datenum\").\r\n\r\nThe date shall be considered a palindrome if the \"mmddyy\" form of the date is a palindrome with leading zeros removed from months and days.  Thus, a date number of 706076 corresponds to March 3, 1933, which can be written 03/03/33.  Then the leading zeros are removed to get \"3333\" --\u003e true.  Date number 695118 corresponds to March 3, 1903, i.e. \"030303\" which reduces to \"3303\" --\u003e false.","description_html":"\u003cp\u003eTake a MATLAB date number as input, and return true if the date is a palindrome, false if the date is not a palindrome.  A date number is a scalar double representing the decimal days since Jan. 1, 0000 (type \"help datenum\").\u003c/p\u003e\u003cp\u003eThe date shall be considered a palindrome if the \"mmddyy\" form of the date is a palindrome with leading zeros removed from months and days.  Thus, a date number of 706076 corresponds to March 3, 1933, which can be written 03/03/33.  Then the leading zeros are removed to get \"3333\" --\u003e true.  Date number 695118 corresponds to March 3, 1903, i.e. \"030303\" which reduces to \"3303\" --\u003e false.\u003c/p\u003e","function_template":"function tf = isPalindrome(d)\r\n  tf = false;\r\nend","test_suite":"%%\r\nd = datenum('01-Jan-2011 02:02:02',0);\r\ntf = true;\r\nassert(isequal(isPalindrome(d),tf))\r\n\r\n%%\r\nd = datenum('02/01/12',2);\r\ntf = true;\r\nassert(isequal(isPalindrome(d),tf))\r\n\r\n%%\r\nd = datenum('12-Nov-1943',1);\r\ntf = false;\r\nassert(isequal(isPalindrome(d),tf))\r\n\r\n%%\r\nd = datenum('10/10/01',2);\r\ntf = false;\r\nassert(isequal(isPalindrome(d),tf))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":1,"created_by":80,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":90,"test_suite_updated_at":"2018-08-30T16:48:29.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-02-01T16:08:32.000Z","updated_at":"2026-01-05T00:09:20.000Z","published_at":"2012-02-01T23:06:32.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\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"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\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\u003eTake a MATLAB date number as input, and return true if the date is a palindrome, false if the date is not a palindrome. A date number is a scalar double representing the decimal days since Jan. 1, 0000 (type \\\"help datenum\\\").\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\u003eThe date shall be considered a palindrome if the \\\"mmddyy\\\" form of the date is a palindrome with leading zeros removed from months and days. Thus, a date number of 706076 corresponds to March 3, 1933, which can be written 03/03/33. Then the leading zeros are removed to get \\\"3333\\\" --\u003e true. Date number 695118 corresponds to March 3, 1903, i.e. \\\"030303\\\" which reduces to \\\"3303\\\" --\u003e false.\u003c/w:t\u003e\u003c/w:r\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":548,"title":"How many palindromes?","description":"* Given a set of letters, count all possible palindromes, using all of those letters.\r\n* For example, if the set is {'A' 'A' 'A'} then the number is 1.\r\n* If the set is {'A 'A' 'B'} then the number is 1.\r\n* If the set is {'A' 'B' 'C'} then the number is 0. ","description_html":"\u003cul\u003e\u003cli\u003eGiven a set of letters, count all possible palindromes, using all of those letters.\u003c/li\u003e\u003cli\u003eFor example, if the set is {'A' 'A' 'A'} then the number is 1.\u003c/li\u003e\u003cli\u003eIf the set is {'A 'A' 'B'} then the number is 1.\u003c/li\u003e\u003cli\u003eIf the set is {'A' 'B' 'C'} then the number is 0.\u003c/li\u003e\u003c/ul\u003e","function_template":"function only = howmany(x)\r\n         only = 1;\r\nend","test_suite":"%%\r\nx={'A' 'A' 'A'};\r\nassert(howmany(x)==1)\r\n\r\n%%\r\nx={'A' 'B' 'C'};\r\nassert(howmany(x)==0)\r\n\r\n%%\r\nx={'A' 'A' 'A' 'A' 'B'};\r\nassert(howmany(x)==1)\r\n\r\n%%\r\nx={'A' 'A' 'A' 'B' 'B'};\r\nassert(howmany(x)==2)\r\n\r\n%%\r\nx={'A' 'A' 'A' 'B' 'B' 'B'};\r\nassert(howmany(x)==0)\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":166,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":29,"test_suite_updated_at":"2012-04-02T04:35:24.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2012-04-02T03:59:44.000Z","updated_at":"2025-06-28T09:52:36.000Z","published_at":"2012-04-02T04:35:24.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=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eGiven a set of letters, count all possible palindromes, using all of those letters.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFor example, if the set is {'A' 'A' 'A'} then the number is 1.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf the set is {'A 'A' 'B'} then the number is 1.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf the set is {'A' 'B' 'C'} then the number is 0.\u003c/w:t\u003e\u003c/w:r\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":172,"title":"Test if a Number is a Palindrome without using any String Operations","description":"*Description*\r\n\r\nGiven an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits reversed (with no leading 0s). The twist is that your code cannot use any function or variable name that has either \"str\", \"eval\", \"flip\" or \"printf\" in it.\r\n\r\n*Example*\r\n\r\n    X = 123454321;\r\n    Y = true;\r\n\r\n    X = 1234;\r\n    Y = false;","description_html":"\u003cp\u003e\u003cb\u003eDescription\u003c/b\u003e\u003c/p\u003e\u003cp\u003eGiven an integer \u003ci\u003eX\u003c/i\u003e, determine if it is a palindrome number. That is, \u003ci\u003eX\u003c/i\u003e is equal to the \u003ci\u003eX\u003c/i\u003e with the digits reversed (with no leading 0s). The twist is that your code cannot use any function or variable name that has either \"str\", \"eval\", \"flip\" or \"printf\" in it.\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample\u003c/b\u003e\u003c/p\u003e\u003cpre\u003e    X = 123454321;\r\n    Y = true;\u003c/pre\u003e\u003cpre\u003e    X = 1234;\r\n    Y = false;\u003c/pre\u003e","function_template":"function y = isNumPalindrome(x)\r\n  y = true;\r\nend","test_suite":"%%\r\nx = 122131221;\r\ny_correct = true;\r\nassert( isequal(isNumPalindrome(x),y_correct) \u0026\u0026 isempty(regexp(evalc('type isNumPalindrome'),'(str|printf|eval|flip|dec2base)')) )\r\n\r\n%%\r\nx = 1221;\r\ny_correct = true;\r\nassert( isequal(isNumPalindrome(x),y_correct) \u0026\u0026 isempty(regexp(evalc('type isNumPalindrome'),'(str|printf|eval|flip|dec2base)')) )\r\n\r\n%%\r\nx = 12345;\r\ny_correct = false;\r\nassert( isequal(isNumPalindrome(x),y_correct) \u0026\u0026 isempty(regexp(evalc('type isNumPalindrome'),'(str|printf|eval|flip|dec2base)')) )\r\n\r\n%%\r\nx = 9849;\r\ny_correct = false;\r\nassert( isequal(isNumPalindrome(x),y_correct) \u0026\u0026 isempty(regexp(evalc('type isNumPalindrome'),'(str|printf|eval|flip|dec2base)')) )","published":true,"deleted":false,"likes_count":4,"comments_count":2,"created_by":134,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":255,"test_suite_updated_at":"2012-04-18T18:19:32.000Z","rescore_all_solutions":false,"group_id":38,"created_at":"2012-01-30T05:24:23.000Z","updated_at":"2026-03-31T17:41:42.000Z","published_at":"2012-01-30T05:39:05.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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eDescription\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\u003eGiven an integer\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eX\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e, determine if it is a palindrome number. That is,\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eX\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is equal to the\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eX\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e with the digits reversed (with no leading 0s). The twist is that your code cannot use any function or variable name that has either \\\"str\\\", \\\"eval\\\", \\\"flip\\\" or \\\"printf\\\" in it.\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample\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[    X = 123454321;\\n    Y = true;\\n\\n    X = 1234;\\n    Y = false;]]\u003e\u003c/w:t\u003e\u003c/w:r\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\"}]}"}],"term":"tag:\"palindrome\"","current_player_id":null,"fields":[{"name":"page","type":"integer","callback":null,"default":1,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"per_page","type":"integer","callback":null,"default":50,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"sort","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"body","type":"text","callback":null,"default":"*:*","directive":null,"facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":false},{"name":"group","type":"string","callback":null,"default":null,"directive":"group","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"difficulty_rating_bin","type":"string","callback":null,"default":null,"directive":"difficulty_rating_bin","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"id","type":"integer","callback":null,"default":null,"directive":"id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"tag","type":"string","callback":null,"default":null,"directive":"tag","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"product","type":"string","callback":null,"default":null,"directive":"product","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_at","type":"timeframe","callback":{},"default":null,"directive":"created_at","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"profile_id","type":"integer","callback":null,"default":null,"directive":"author_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_by","type":"string","callback":null,"default":null,"directive":"author","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player_id","type":"integer","callback":null,"default":null,"directive":"solver_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player","type":"string","callback":null,"default":null,"directive":"solver","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"solvers_count","type":"integer","callback":null,"default":null,"directive":"solvers_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"comments_count","type":"integer","callback":null,"default":null,"directive":"comments_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"likes_count","type":"integer","callback":null,"default":null,"directive":"likes_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leader_id","type":"integer","callback":null,"default":null,"directive":"leader_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leading_solution","type":"integer","callback":null,"default":null,"directive":"leading_solution","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true}],"filters":[{"name":"asset_type","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":"\"cody:problem\"","prepend":true},{"name":"profile_id","type":"integer","callback":{},"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":"author_id","static":null,"prepend":true}],"query":{"params":{"per_page":50,"term":"tag:\"palindrome\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"palindrome\"","","\"","palindrome","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f73601e9800\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f73601e9760\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f73601e8ea0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f73601e9a80\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f73601e99e0\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f73601e9940\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f73601e98a0\u003e":"tag:\"palindrome\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f73601e98a0\u003e":"tag:\"palindrome\""},"queried_facets":{}},"query_backend":{"connection":{"configuration":{"index_url":"http://index-op-v2/solr/","query_url":"http://search-op-v2/solr/","direct_access_index_urls":["http://index-op-v2/solr/"],"direct_access_query_urls":["http://search-op-v2/solr/"],"timeout":10,"vhost":"search","exchange":"search.topic","heartbeat":30,"pre_index_mode":false,"host":"rabbitmq-eks","port":5672,"username":"search","password":"J3bGPZzQ7asjJcCk","virtual_host":"search","indexer":"amqp","http_logging":"true","core":"cody"},"query_connection":{"uri":"http://search-op-v2/solr/cody/","proxy":null,"connection":{"parallel_manager":null,"headers":{"User-Agent":"Faraday v1.0.1"},"params":{},"options":{"params_encoder":"Faraday::FlatParamsEncoder","proxy":null,"bind":null,"timeout":null,"open_timeout":null,"read_timeout":null,"write_timeout":null,"boundary":null,"oauth":null,"context":null,"on_data":null},"ssl":{"verify":true,"ca_file":null,"ca_path":null,"verify_mode":null,"cert_store":null,"client_cert":null,"client_key":null,"certificate":null,"private_key":null,"verify_depth":null,"version":null,"min_version":null,"max_version":null},"default_parallel_manager":null,"builder":{"adapter":{"name":"Faraday::Adapter::NetHttp","args":[],"block":null},"handlers":[{"name":"Faraday::Response::RaiseError","args":[],"block":null}],"app":{"app":{"ssl_cert_store":{"verify_callback":null,"error":null,"error_string":null,"chain":null,"time":null},"app":{},"connection_options":{},"config_block":null}}},"url_prefix":"http://search-op-v2/solr/cody/","manual_proxy":false,"proxy":null},"update_format":"RSolr::JSON::Generator","update_path":"update","options":{"url":"http://search-op-v2/solr/cody"}}},"query":{"params":{"per_page":50,"term":"tag:\"palindrome\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"palindrome\"","","\"","palindrome","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f73601e9800\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f73601e9760\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f73601e8ea0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f73601e9a80\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f73601e99e0\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f73601e9940\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f73601e98a0\u003e":"tag:\"palindrome\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f73601e98a0\u003e":"tag:\"palindrome\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":50023,"difficulty_rating":"easy"},{"id":50018,"difficulty_rating":"easy"},{"id":50003,"difficulty_rating":"easy"},{"id":50013,"difficulty_rating":"easy"},{"id":2276,"difficulty_rating":"easy"},{"id":50028,"difficulty_rating":"easy"},{"id":54285,"difficulty_rating":"easy"},{"id":50033,"difficulty_rating":"easy"},{"id":2275,"difficulty_rating":"easy"},{"id":49958,"difficulty_rating":"easy"},{"id":49953,"difficulty_rating":"easy"},{"id":50008,"difficulty_rating":"easy"},{"id":44512,"difficulty_rating":"easy"},{"id":45663,"difficulty_rating":"easy"},{"id":49998,"difficulty_rating":"easy-medium"},{"id":2055,"difficulty_rating":"easy-medium"},{"id":52293,"difficulty_rating":"easy-medium"},{"id":42461,"difficulty_rating":"easy-medium"},{"id":216,"difficulty_rating":"easy-medium"},{"id":548,"difficulty_rating":"easy-medium"},{"id":172,"difficulty_rating":"medium"}]}}