{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2026-04-06T14:01:22.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":"2026-04-06T00: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":44686,"title":"Draw 'J'","description":"Given n as input, generate a n-by-n matrix 'J' using 0 and 1 .\r\n\r\nExample:\r\n\r\n  n=5\r\n  ans=\r\n  [0 0 0 0 1\r\n   0 0 0 0 1\r\n   0 0 0 0 1\r\n   1 0 0 0 1\r\n   1 1 1 1 1]\r\n n=4\r\n  ans=\r\n  [0 0 0 1\r\n   0 0 0 1 \r\n   1 0 0 1\r\n   1 1 1 1]","description_html":"\u003cp\u003eGiven n as input, generate a n-by-n matrix 'J' using 0 and 1 .\u003c/p\u003e\u003cp\u003eExample:\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003en=5\r\nans=\r\n[0 0 0 0 1\r\n 0 0 0 0 1\r\n 0 0 0 0 1\r\n 1 0 0 0 1\r\n 1 1 1 1 1]\r\nn=4\r\nans=\r\n[0 0 0 1\r\n 0 0 0 1 \r\n 1 0 0 1\r\n 1 1 1 1]\r\n\u003c/pre\u003e","function_template":"function ans = J(x)\r\n  zeros(x)\r\nend","test_suite":"%%\r\nx = 5;\r\ny_correct = [0 0 0 0 1\r\n   0 0 0 0 1\r\n   0 0 0 0 1\r\n   1 0 0 0 1\r\n   1 1 1 1 1];\r\nassert(isequal(J(x),y_correct))\r\n%%\r\nx = 3;\r\ny_correct = [0 0 1\r\n   1 0 1 \r\n   1 1 1]  \r\nassert(isequal(J(x),y_correct))\r\n%%\r\nx = 4;\r\ny_correct =  [0 0 0 1\r\n   0 0 0 1\r\n   1 0 0 1\r\n   1 1 1 1]  \r\nassert(isequal(J(x),y_correct))\r\n%%\r\nx = 6;\r\ny_correct = ...\r\n  [0 0 0 0 0 1\r\n   0 0 0 0 0 1\r\n   0 0 0 0 0 1\r\n   0 0 0 0 0 1\r\n   1 0 0 0 0 1\r\n   1 1 1 1 1 1];\r\nassert(isequal(J(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":8,"comments_count":2,"created_by":218677,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":1097,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":46,"created_at":"2018-06-12T20:50:35.000Z","updated_at":"2026-04-05T20:27:23.000Z","published_at":"2018-06-12T20:50:35.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 n as input, generate a n-by-n matrix 'J' using 0 and 1 .\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=5\\nans=\\n[0 0 0 0 1\\n 0 0 0 0 1\\n 0 0 0 0 1\\n 1 0 0 0 1\\n 1 1 1 1 1]\\nn=4\\nans=\\n[0 0 0 1\\n 0 0 0 1 \\n 1 0 0 1\\n 1 1 1 1]]]\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":44646,"title":"Draw a 'Z'.","description":"Given _n_ as input, generate a  n-by-n matrix like 'Z' by _0_  and _1_ .\r\n\r\nExample:\r\n\r\n  n=5\r\n  ans=\r\n  [1 1 1 1 1\r\n   0 0 0 1 0\r\n   0 0 1 0 0\r\n   0 1 0 0 0\r\n   1 1 1 1 1]\r\n","description_html":"\u003cp\u003eGiven \u003ci\u003en\u003c/i\u003e as input, generate a  n-by-n matrix like 'Z' by \u003ci\u003e0\u003c/i\u003e  and \u003ci\u003e1\u003c/i\u003e .\u003c/p\u003e\u003cp\u003eExample:\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003en=5\r\nans=\r\n[1 1 1 1 1\r\n 0 0 0 1 0\r\n 0 0 1 0 0\r\n 0 1 0 0 0\r\n 1 1 1 1 1]\r\n\u003c/pre\u003e","function_template":"function ans = Z(n)\r\n  zeros(n)\r\nend","test_suite":"%%\r\nn = 3;\r\ny_correct = [1 1 1;0 1 0;1 1 1];\r\nassert(isequal(Z(n),y_correct))\r\n%%\r\nn = 4;\r\ny_correct = [1 1 1 1;0 0 1 0; 0 1 0 0; 1 1 1 1];\r\nassert(isequal(Z(n),y_correct))\r\n%%\r\nn = 5;\r\ny_correct = [1 1 1 1 1; 0 0 0 1 0;  0 0 1 0 0;  0 1 0 0 0;  1 1 1 1 1];\r\nassert(isequal(Z(n),y_correct))\r\n\r\n","published":true,"deleted":false,"likes_count":12,"comments_count":1,"created_by":218677,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":927,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":46,"created_at":"2018-05-19T18:58:36.000Z","updated_at":"2026-04-05T20:08:00.000Z","published_at":"2018-05-19T18:58:36.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\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\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e as input, generate a n-by-n matrix like 'Z' by\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\u003e0\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and\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\u003e1\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: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=5\\nans=\\n[1 1 1 1 1\\n 0 0 0 1 0\\n 0 0 1 0 0\\n 0 1 0 0 0\\n 1 1 1 1 1]]]\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":44685,"title":"Draw 'B'","description":"Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4)\r\n\r\nExample:\r\n \r\n  x=5\r\n  ans=\r\n  [1 1 1 1 0\r\n   1 0 0 0 1\r\n   1 1 1 1 0\r\n   1 0 0 0 1\r\n   1 1 1 1 0]\r\n  x=7\r\n  ans=\r\n  [1 1 1 1 1 1 0\r\n   1 0 0 0 0 0 1\r\n   1 0 0 0 0 0 1\r\n   1 1 1 1 1 1 0 \r\n   1 0 0 0 0 0 1\r\n   1 0 0 0 0 0 1\r\n   1 1 1 1 1 1 0]","description_html":"\u003cp\u003eDraw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4)\u003c/p\u003e\u003cp\u003eExample:\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003ex=5\r\nans=\r\n[1 1 1 1 0\r\n 1 0 0 0 1\r\n 1 1 1 1 0\r\n 1 0 0 0 1\r\n 1 1 1 1 0]\r\nx=7\r\nans=\r\n[1 1 1 1 1 1 0\r\n 1 0 0 0 0 0 1\r\n 1 0 0 0 0 0 1\r\n 1 1 1 1 1 1 0 \r\n 1 0 0 0 0 0 1\r\n 1 0 0 0 0 0 1\r\n 1 1 1 1 1 1 0]\r\n\u003c/pre\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 5;\r\ny_correct = ...\r\n[1 1 1 1 0\r\n 1 0 0 0 1\r\n 1 1 1 1 0\r\n 1 0 0 0 1\r\n 1 1 1 1 0];\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n%%\r\nx = 7;\r\ny_correct = ...\r\n[1 1 1 1 1 1 0\r\n 1 0 0 0 0 0 1\r\n 1 0 0 0 0 0 1\r\n 1 1 1 1 1 1 0 \r\n 1 0 0 0 0 0 1\r\n 1 0 0 0 0 0 1\r\n 1 1 1 1 1 1 0]\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n%%\r\nx = 11;\r\ny_correct = ...\r\n[1 1 1 1 1 1 1 1 1 1 0\r\n 1 0 0 0 0 0 0 0 0 0 1\r\n 1 0 0 0 0 0 0 0 0 0 1\r\n 1 0 0 0 0 0 0 0 0 0 1\r\n 1 0 0 0 0 0 0 0 0 0 1\r\n 1 1 1 1 1 1 1 1 1 1 0\r\n 1 0 0 0 0 0 0 0 0 0 1\r\n 1 0 0 0 0 0 0 0 0 0 1\r\n 1 0 0 0 0 0 0 0 0 0 1\r\n 1 0 0 0 0 0 0 0 0 0 1\r\n 1 1 1 1 1 1 1 1 1 1 0]\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":16,"comments_count":3,"created_by":218677,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":1069,"test_suite_updated_at":"2019-05-13T17:47:23.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2018-06-11T19:54:31.000Z","updated_at":"2026-04-06T22:25:46.000Z","published_at":"2018-06-11T19:54:31.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\u003eDraw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4)\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[x=5\\nans=\\n[1 1 1 1 0\\n 1 0 0 0 1\\n 1 1 1 1 0\\n 1 0 0 0 1\\n 1 1 1 1 0]\\nx=7\\nans=\\n[1 1 1 1 1 1 0\\n 1 0 0 0 0 0 1\\n 1 0 0 0 0 0 1\\n 1 1 1 1 1 1 0 \\n 1 0 0 0 0 0 1\\n 1 0 0 0 0 0 1\\n 1 1 1 1 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":649,"title":"Return the first and last characters of a character array","description":"Return the first and last character of a string, concatenated together. If there is only one character in the string, the function should give that character back twice since it is both the first and last character of the string.\r\n\r\nExample:\r\n\r\n   stringfirstandlast('boring example') = 'be'","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: 123.433px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 61.7167px; transform-origin: 407px 61.7167px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 63px; 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: 364px 8px; transform-origin: 364px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eReturn the first and last characters of a character array, concatenated together. If there is only one character in the character array, the function should give that character back twice since it is both the first and last character of the character array.\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: 28.5px 8px; transform-origin: 28.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: 20.4333px; 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 10.2167px; transform-origin: 404px 10.2167px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; 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: 184px 8.5px; transform-origin: 184px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 88px 8.5px; transform-origin: 88px 8.5px; \"\u003e   stringfirstandlast(\u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 64px 8.5px; text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 64px 8.5px; \"\u003e'boring example'\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 16px 8.5px; transform-origin: 16px 8.5px; \"\u003e) = \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 16px 8.5px; text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 16px 8.5px; \"\u003e'be'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = stringfirstandlast(x)\r\n  y = x(1);\r\nend","test_suite":"%%\r\nx = 'abcde';\r\ny_correct = 'ae';\r\nassert(isequal(stringfirstandlast(x),y_correct))\r\n\r\n%%\r\nx = 'a';\r\ny_correct = 'aa';\r\nassert(isequal(stringfirstandlast(x),y_correct))\r\n\r\n%%\r\nx = 'codyrocks!';\r\ny_correct = 'c!';\r\nassert(isequal(stringfirstandlast(x),y_correct))\r\n\r\n%%\r\nx = ' ';\r\ny_correct = '  ';\r\nassert(isequal(stringfirstandlast(x),y_correct))\r\n\r\n%%\r\nx = '  ';\r\ny_correct = '  ';\r\nassert(isequal(stringfirstandlast(x),y_correct))\r\n\r\n%%\r\nx = 'az';\r\ny_correct = 'az';\r\nassert(isequal(stringfirstandlast(x),y_correct))\r\n\r\n%%\r\nx = 'abcdefghijklmnopqrstuvwxyz';\r\ny_correct = 'az';\r\nassert(isequal(stringfirstandlast(x),y_correct))\r\n\r\n%%\r\nx = '0123456789';\r\ny_correct = '09';\r\nassert(isequal(stringfirstandlast(x),y_correct))\r\n\r\n%%\r\nx = '09';\r\ny_correct = '09';\r\nassert(isequal(stringfirstandlast(x),y_correct))","published":true,"deleted":false,"likes_count":44,"comments_count":5,"created_by":134,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":11899,"test_suite_updated_at":"2021-01-20T11:13:02.000Z","rescore_all_solutions":false,"group_id":14,"created_at":"2012-05-01T18:41:40.000Z","updated_at":"2026-04-08T16:01:38.000Z","published_at":"2012-05-01T18:41:56.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\u003eReturn the first and last characters of a character array, concatenated together. If there is only one character in the character array, the function should give that character back twice since it is both the first and last character of the character array.\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[   stringfirstandlast('boring example') = 'be']]\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":52472,"title":"Vector to Decimal","description":"Given an integer vector ,  return its decimal representation  as a character array.\r\n% Examples\r\nv = 7\r\nx = '7'\r\n%\r\nv = [4 2]\r\nx = '42'\r\n%\r\nv = [0 7]\r\nx = '7'\r\n%\r\nv = [3 12]\r\nx = '42'","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: 294.048px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 406.989px 147.017px; transform-origin: 406.996px 147.024px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 44.0483px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.991px 22.017px; text-align: left; transform-origin: 383.999px 22.0241px; 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 an integer vector \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOgAAAAoCAYAAAD0QbbMAAAAAXNSR0IArs4c6QAACHpJREFUeF7tnXvs/9Ucxx/JopS5Jaq5baZWQmVExZjbEBnriiwKISK6uTOXIddhy61IyaVYE/qjWmXpstToYtNlKeW2GMpQe3COHe/f+/P+vM/7/fl8ev/6vs723X6/7+ec836d5znP1+28Pu/vBkQLBAKBySKwwWQlC8ECgUCAtUTQ5wPbt+z59cB3gH/EeQgElozAQ4C9gXu1POe7wK+av19LBH0nsCfwuwYIPwM+CNy25M2J6QOBRwEfAu5XQHEP4NHAfsB5a52gvwa+EeckEJgQAhsDxwInBEEhCDqhkxmi/AeBIGg6CLq4QdBgxdQQCIIGQad2JkOe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552p7k15mZ2L27cGPlGZUazFqrzHm1WosEp5auVfZH+VkN7MDR35hDHPM2zRrd0fyLXSOSb1FsB66uNTOahZfN8mn5vZZa/wVOhr/s3yVuM0W01MMmsT/Zsb3pNJVhMJbogENKmTie+muFn/TmWEs4oLxhyUPNbnW/VkXOz3G7+cLIcZRquQbKuUZxFrGjqHBNDLuTzF/eK/yJYr7vQyrcG+Jk1ugkjLeUkqJjFb3VUH0KpE19LfZlnkpsRcgcBKEAiCrgTmeEggMAyBIOgw3GJUILASBEqCWuXh+3j02WubiRYvaJf9doFauaJ/ILBeI1AStLzzrF1U82tZteOjfyAQCLQgEC5uHItAYMIIBEEnvDkhWiAQBI0zEAhMGIEg6IQ3J0QLBO4EDo9VR8kfkDwAAAAASUVORK5CYII=\" width=\"116\" height=\"20\" style=\"width: 116px; height: 20px;\"\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\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK0AAAAlCAYAAAAwTGn2AAAAAXNSR0IArs4c6QAACNpJREFUeF7tm3fMLkUVxn8XEaMIBhuoQY0hqFE0IAR7RTEkYkURRDAICNhRsUQslIBRQBAQ1NixYGLBggpEBYmUf6SqMZYoqNiDxqgQzS+cc5277vfu7L577/3e++78c8s3Oztz5tnnPOeZ+dYwtSkCCxaBNQs232m6UwSYQDuBYOEiMIF24bZsmvAE2gkDCxeBCbQLt2XThCfQThhYuAgsC2j3Bz5V7M6XgcOA31Xs2IOBzwFHAt+v6D91+V8EmnEfEptvAo7zx3x4mUD7MuAVsfD3AjcCbwL+3hHJCbRDoHb7M3cG7lLx+B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v/vMupJyoo7x+e6eHFLacSeD7Tx4bLZ42x2WqW1ZNSTV39l7jZZgYY6rOmBJIsvCV3UhwXj33Ak/bWjsBrAT861+LRvfaWQK5tEuM6mawJ2hTsK22ColpmtJ/FhBbNOhd0a2cS/UyNMrofQ23rA5AhoG1mghyjlAcyraxhhvDyia1W8yo5zgp27bpf0Px1lTEcF0nCrOAxap9Wuz7HbH7Ufd7T7OvhlplsbdtYt7zKOeTdTp0IbbT1cZ92nqB1PeuHbPFmcPvc8e0aN/1wGdnCV4bS31ROzCul/OhkW71fZUrN1dA+oO1a21w/Xw2gnWsBq+Bhi40nAscN0Jmzpp8Fmx+Ct74EreyurPLuqUeiGvNDpcIqCN2wKUygHRa3fEqNqAuiTBii62e9Pf1wx/e+qZrQo1817ccCtJ6s9S3I5lvxKnh6Au3wTdBV0PPURvJe6NjN6t7iz3se/v6UKV2Nq77T7rIit1hcujaBdum2fPEXPIF28fdw6VYwgXbptnzxFzyBdvH3cOlWMIF26bZ88Rc8gXbx93DpVvBfLuEURHMmVwwAAAAASUVORK5CYII=\" width=\"86.5\" height=\"18.5\" style=\"width: 86.5px; height: 18.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 return its decimal representation \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALcAAAAtCAYAAADsk/q6AAAAAXNSR0IArs4c6QAACZpJREFUeF7tnGnMLEUVhh/UuCuKCKhs/jBCZFNwV0QiihoBCYhsggoiuKAS94AbqEAUXEFEQRRconEhrP5gUwMEiIpGZElUEBcQNW5xJw85RZpOz0z1TPfcmemq5Obem6+7uurUW6fe855T31qU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15QS8ueCupt/Vr6Wf9Valp6dHPNC3qjT1ekwCt9xP/qkHMblhJZjHtjzL+gP1bhMRpmCXMXXtxj0pTqU1UTxVDdRN5KjbXhDUr6mQS6pidlD65FU5JVnvFFrTofO5tQEJueCuVv2lfEZdfky11BZhzSPhNTWwfbEObv/vnUM9gjvS2yvm772EqZaZovvEu02BmoJVQF+TJZ7TGCEFkF4PkwbMkj2b5vu+U9WXVT8MFvXKTcCup5/Vv10f10swjvKgueB2PKnk1TWvVv0lrKjoWPLadanwtPYb+14d3NsApnotNtd4Zhytx01e+Snxc48wPflfI329bF47pd29OdJlACkA9W6qHjmUIYFbqjep9LaafrY0VRpj09OP25jeiDGLaLPUQLoxrrzXgrKk8bvZkuRrrkPd3USep/bdae5ekNlBp3Vwe0xLPTz+lKjUMas3VdRDjdZNteu9/bfXkJatGTAZsBlDdBlA6iXNBejdcurDlfakRXrrSfUjKZFm/GOBkFRQXt70Ha+Jqbg4T4M+nZVNQMqVrQ3xQsEoxctTzXf948nmupui912/uSZOudYYm8S5W3e4BC/0FUAKCGugrWHu4wZ8PRhfaBluEXAwNHD3FUDqKVUYDAjrmcYu1jml6qUvUgaVnatmrDnpYlwL3ceQwJ0CSOOI6v2/WRdIXdqMoVRtlIQ26zeSqiIVMYsouOXd6vNewXpM0MMcKjTrWJbm/aGAOwWQ3v3rIrVujYf1HWbrpAsmV+SmSnNd/QqDKohSgsWA0Bvo8m+TavJfebDgNkZaCi48r90xBHCnij/lPn+33DQXKgSvSpL0QzVBRaTeRmnDXaylqfHqLXI3q5vKhI/f9SRaePWiC0O06WMI4DaAVI0w8dBnK78Is0/rTtH3EMA9hVnKK6tggQLuVVjFModGCxRwF2CsrAUKuFd2acvECrgLBlbWAgXcK7u0ZWIF3AUDK2uBAu6VXdoysTsBKDYfTEiTeiQAAAAASUVORK5CYII=\" width=\"91.5\" height=\"22.5\" style=\"width: 91.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 as a character array.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 240px; 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: 403.991px 120px; transform-origin: 403.999px 120px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration: none; text-decoration-color: rgb(2, 128, 9); \"\u003e% Examples\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ev = 7\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ex = \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003e'7'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration: none; text-decoration-color: rgb(2, 128, 9); \"\u003e%\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ev = [4 2]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ex = \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003e'42'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration: none; text-decoration-color: rgb(2, 128, 9); \"\u003e%\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ev = [0 7]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ex = \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003e'7'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration: none; text-decoration-color: rgb(2, 128, 9); \"\u003e%\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ev = [3 12]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ex = \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003e'42'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function x = vector2dec(v)\r\n  x = ['' v + '0'];\r\nend","test_suite":"%% Example EASY 1\r\nv = 7;\r\nx_correct = '7';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% Example EASY 2\r\nv = [4 2];\r\nx_correct = '42';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% Example tricky 1\r\nv = [0 7];\r\nx_correct = '7';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% Example tricky 2\r\nv = [3 12];\r\nx_correct = '42';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% in Z test 1\r\nv = 0;\r\nx_correct = '0';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% in Z test 2\r\nv = -1;\r\nx_correct = '-1';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% in Z test 3\r\nv = [-4 -2];\r\nx_correct = '-42';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% in Z test 4\r\nv = [1 -5 -8];\r\nx_correct = '42';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% Medium number test 1\r\nv = '123456789' - '0';\r\nx_correct = '123456789';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% Medium number test 2\r\nv = randi(10, 1, 10) - 1;\r\nif v(1) == 0\r\n    v(1) = 1;\r\nend\r\nx_correct = v + '0';\r\nassert(isequal(vector2dec(v),x_correct))\r\nassert(isequal(vector2dec(-v), ['-' x_correct]))\r\n\r\n%% Big number test 1\r\nv = randi(10, 1, 10000) - 1;\r\nif v(1) == 0\r\n    v(1) = 1;\r\nend\r\nx_correct = v + '0';\r\nassert(isequal(vector2dec(v.'),x_correct))\r\n\r\n%% Big number test 2\r\nn = 10000;\r\nrng('shuffle');\r\nv_correct = randi(10, 1, n) - 1;\r\nif v_correct(1) == 0\r\n    v_correct(1) = 1;\r\nend\r\nx_correct = v_correct + '0';\r\nv = v_correct;\r\nfor ii = 1:3\r\n    dk = randperm(n - 4, fix(n/2));\r\n    dv = randi(10, 1, fix(n/2)) - 5;\r\n    dE = randi(4, 1, fix(n/2));\r\n    [~, loc] = unique(dk + dE);\r\n    dk = dk(loc);\r\n    dv = dv(loc);\r\n    dE = dE(loc);\r\n    v(dk) = v(dk) + dv;\r\n    v(dk + dE) = v(dk + dE) - dv.*(10.^dE);\r\nend\r\nrng('shuffle');\r\n\r\nassert(isequal(vector2dec(v),x_correct))\r\nassert(isequal(vector2dec(-v), ['-' x_correct]))\r\n\r\n%% Shame Test 1\r\nfileText = fileread('vector2dec.m');\r\nFORBIDDEN_ = {'eval', 'mlock', 'munlock', 'fileread'};\r\n% Filters very obvious cheating\r\nif contains(fileText, FORBIDDEN_)\r\n    for k = 1:10000\r\n        disp('SHAME')\r\n    end\r\n    assert(false);\r\nend\r\n\r\n%% Shame Test 2\r\nfileText = fileread('vector2dec.m');\r\nFORBIDDEN_ = {'!', '?@'};\r\n% Filters cheating, may trigger false positives\r\nassert(~contains(fileText, FORBIDDEN_), '! and ?@ are forbidden')","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":543257,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":5,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-08-10T17:20:12.000Z","updated_at":"2021-08-11T00:05:08.000Z","published_at":"2021-08-11T00:05: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\u003eGiven an integer vector \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\\\\underline{v} = [v_0, v_1,~...~, v_n]\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\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 \\\\in{} \\\\mathbb{N}, v_k   \\\\in{} \\\\mathbb{Z}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e return its decimal representation \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\u003ex=\\\\sum{}v_k10^{n-k}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e as a character array.\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[% Examples\\nv = 7\\nx = '7'\\n%\\nv = [4 2]\\nx = '42'\\n%\\nv = [0 7]\\nx = '7'\\n%\\nv = [3 12]\\nx = '42']]\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":466,"title":"Compress strings (not springs)","description":"Please remove excess space, limit one space between others, and no space before punctuation marks.\r\n \r\n* For example, 'Trendy ,    Cody  ,    Contest .' \r\n* should be ---- 'Trendy, Cody, Contest.'","description_html":"\u003cp\u003ePlease remove excess space, limit one space between others, and no space before punctuation marks.\u003c/p\u003e\u003cul\u003e\u003cli\u003eFor example, 'Trendy ,    Cody  ,    Contest .'\u003c/li\u003e\u003cli\u003eshould be ---- 'Trendy, Cody, Contest.'\u003c/li\u003e\u003c/ul\u003e","function_template":"function y = cozy_cody(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx='Blogs  ,    Trendy  ,    Cody  ,    Contest .';\r\ny='Blogs, Trendy, Cody, Contest.';\r\nassert(isequal(cozy_cody(x),y))\r\n\r\n%%\r\nx='Trendy ,                      Cody ,                          Contest .';\r\ny='Trendy, Cody, Contest.';\r\nassert(isequal(cozy_cody(x),y))\r\n\r\n%%\r\nx='One Two  Three   Four    Five     Six      Seven       Eight        Nine         Ten';\r\ny='One Two Three Four Five Six Seven Eight Nine Ten';\r\nassert(isequal(cozy_cody(x),y))\r\n\r\n%%\r\nx='1, 2,  3,   4,    5,     6,      7,       8,        9,         10';\r\ny='1, 2, 3, 4, 5, 6, 7, 8, 9, 10';\r\nassert(isequal(cozy_cody(x),y))\r\n\r\n%%\r\nx='1   , and 3  ,  and 7 ,   and                             12';\r\ny='1, and 3, and 7, and 12';\r\nassert(isequal(cozy_cody(x),y))\r\n\r\n%%\r\nx='Hello                                            There          !';\r\ny='Hello There!';\r\nassert(isequal(cozy_cody(x),y))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":166,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":219,"test_suite_updated_at":"2016-12-12T17:16:34.000Z","rescore_all_solutions":false,"group_id":14,"created_at":"2012-03-07T17:51:28.000Z","updated_at":"2026-03-11T20:56:15.000Z","published_at":"2012-03-13T14:50:34.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\u003ePlease remove excess space, limit one space between others, and no space before punctuation marks.\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, 'Trendy , Cody , Contest .'\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\u003eshould be ---- 'Trendy, Cody, Contest.'\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":44686,"title":"Draw 'J'","description":"Given n as input, generate a n-by-n matrix 'J' using 0 and 1 .\r\n\r\nExample:\r\n\r\n  n=5\r\n  ans=\r\n  [0 0 0 0 1\r\n   0 0 0 0 1\r\n   0 0 0 0 1\r\n   1 0 0 0 1\r\n   1 1 1 1 1]\r\n n=4\r\n  ans=\r\n  [0 0 0 1\r\n   0 0 0 1 \r\n   1 0 0 1\r\n   1 1 1 1]","description_html":"\u003cp\u003eGiven n as input, generate a n-by-n matrix 'J' using 0 and 1 .\u003c/p\u003e\u003cp\u003eExample:\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003en=5\r\nans=\r\n[0 0 0 0 1\r\n 0 0 0 0 1\r\n 0 0 0 0 1\r\n 1 0 0 0 1\r\n 1 1 1 1 1]\r\nn=4\r\nans=\r\n[0 0 0 1\r\n 0 0 0 1 \r\n 1 0 0 1\r\n 1 1 1 1]\r\n\u003c/pre\u003e","function_template":"function ans = J(x)\r\n  zeros(x)\r\nend","test_suite":"%%\r\nx = 5;\r\ny_correct = [0 0 0 0 1\r\n   0 0 0 0 1\r\n   0 0 0 0 1\r\n   1 0 0 0 1\r\n   1 1 1 1 1];\r\nassert(isequal(J(x),y_correct))\r\n%%\r\nx = 3;\r\ny_correct = [0 0 1\r\n   1 0 1 \r\n   1 1 1]  \r\nassert(isequal(J(x),y_correct))\r\n%%\r\nx = 4;\r\ny_correct =  [0 0 0 1\r\n   0 0 0 1\r\n   1 0 0 1\r\n   1 1 1 1]  \r\nassert(isequal(J(x),y_correct))\r\n%%\r\nx = 6;\r\ny_correct = ...\r\n  [0 0 0 0 0 1\r\n   0 0 0 0 0 1\r\n   0 0 0 0 0 1\r\n   0 0 0 0 0 1\r\n   1 0 0 0 0 1\r\n   1 1 1 1 1 1];\r\nassert(isequal(J(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":8,"comments_count":2,"created_by":218677,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":1097,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":46,"created_at":"2018-06-12T20:50:35.000Z","updated_at":"2026-04-05T20:27:23.000Z","published_at":"2018-06-12T20:50:35.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 n as input, generate a n-by-n matrix 'J' using 0 and 1 .\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=5\\nans=\\n[0 0 0 0 1\\n 0 0 0 0 1\\n 0 0 0 0 1\\n 1 0 0 0 1\\n 1 1 1 1 1]\\nn=4\\nans=\\n[0 0 0 1\\n 0 0 0 1 \\n 1 0 0 1\\n 1 1 1 1]]]\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":44646,"title":"Draw a 'Z'.","description":"Given _n_ as input, generate a  n-by-n matrix like 'Z' by _0_  and _1_ .\r\n\r\nExample:\r\n\r\n  n=5\r\n  ans=\r\n  [1 1 1 1 1\r\n   0 0 0 1 0\r\n   0 0 1 0 0\r\n   0 1 0 0 0\r\n   1 1 1 1 1]\r\n","description_html":"\u003cp\u003eGiven \u003ci\u003en\u003c/i\u003e as input, generate a  n-by-n matrix like 'Z' by \u003ci\u003e0\u003c/i\u003e  and \u003ci\u003e1\u003c/i\u003e .\u003c/p\u003e\u003cp\u003eExample:\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003en=5\r\nans=\r\n[1 1 1 1 1\r\n 0 0 0 1 0\r\n 0 0 1 0 0\r\n 0 1 0 0 0\r\n 1 1 1 1 1]\r\n\u003c/pre\u003e","function_template":"function ans = Z(n)\r\n  zeros(n)\r\nend","test_suite":"%%\r\nn = 3;\r\ny_correct = [1 1 1;0 1 0;1 1 1];\r\nassert(isequal(Z(n),y_correct))\r\n%%\r\nn = 4;\r\ny_correct = [1 1 1 1;0 0 1 0; 0 1 0 0; 1 1 1 1];\r\nassert(isequal(Z(n),y_correct))\r\n%%\r\nn = 5;\r\ny_correct = [1 1 1 1 1; 0 0 0 1 0;  0 0 1 0 0;  0 1 0 0 0;  1 1 1 1 1];\r\nassert(isequal(Z(n),y_correct))\r\n\r\n","published":true,"deleted":false,"likes_count":12,"comments_count":1,"created_by":218677,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":927,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":46,"created_at":"2018-05-19T18:58:36.000Z","updated_at":"2026-04-05T20:08:00.000Z","published_at":"2018-05-19T18:58:36.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\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\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e as input, generate a n-by-n matrix like 'Z' by\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\u003e0\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and\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\u003e1\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: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=5\\nans=\\n[1 1 1 1 1\\n 0 0 0 1 0\\n 0 0 1 0 0\\n 0 1 0 0 0\\n 1 1 1 1 1]]]\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":44685,"title":"Draw 'B'","description":"Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4)\r\n\r\nExample:\r\n \r\n  x=5\r\n  ans=\r\n  [1 1 1 1 0\r\n   1 0 0 0 1\r\n   1 1 1 1 0\r\n   1 0 0 0 1\r\n   1 1 1 1 0]\r\n  x=7\r\n  ans=\r\n  [1 1 1 1 1 1 0\r\n   1 0 0 0 0 0 1\r\n   1 0 0 0 0 0 1\r\n   1 1 1 1 1 1 0 \r\n   1 0 0 0 0 0 1\r\n   1 0 0 0 0 0 1\r\n   1 1 1 1 1 1 0]","description_html":"\u003cp\u003eDraw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4)\u003c/p\u003e\u003cp\u003eExample:\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003ex=5\r\nans=\r\n[1 1 1 1 0\r\n 1 0 0 0 1\r\n 1 1 1 1 0\r\n 1 0 0 0 1\r\n 1 1 1 1 0]\r\nx=7\r\nans=\r\n[1 1 1 1 1 1 0\r\n 1 0 0 0 0 0 1\r\n 1 0 0 0 0 0 1\r\n 1 1 1 1 1 1 0 \r\n 1 0 0 0 0 0 1\r\n 1 0 0 0 0 0 1\r\n 1 1 1 1 1 1 0]\r\n\u003c/pre\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 5;\r\ny_correct = ...\r\n[1 1 1 1 0\r\n 1 0 0 0 1\r\n 1 1 1 1 0\r\n 1 0 0 0 1\r\n 1 1 1 1 0];\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n%%\r\nx = 7;\r\ny_correct = ...\r\n[1 1 1 1 1 1 0\r\n 1 0 0 0 0 0 1\r\n 1 0 0 0 0 0 1\r\n 1 1 1 1 1 1 0 \r\n 1 0 0 0 0 0 1\r\n 1 0 0 0 0 0 1\r\n 1 1 1 1 1 1 0]\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n%%\r\nx = 11;\r\ny_correct = ...\r\n[1 1 1 1 1 1 1 1 1 1 0\r\n 1 0 0 0 0 0 0 0 0 0 1\r\n 1 0 0 0 0 0 0 0 0 0 1\r\n 1 0 0 0 0 0 0 0 0 0 1\r\n 1 0 0 0 0 0 0 0 0 0 1\r\n 1 1 1 1 1 1 1 1 1 1 0\r\n 1 0 0 0 0 0 0 0 0 0 1\r\n 1 0 0 0 0 0 0 0 0 0 1\r\n 1 0 0 0 0 0 0 0 0 0 1\r\n 1 0 0 0 0 0 0 0 0 0 1\r\n 1 1 1 1 1 1 1 1 1 1 0]\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n","published":true,"deleted":false,"likes_count":16,"comments_count":3,"created_by":218677,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":1069,"test_suite_updated_at":"2019-05-13T17:47:23.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2018-06-11T19:54:31.000Z","updated_at":"2026-04-06T22:25:46.000Z","published_at":"2018-06-11T19:54:31.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\u003eDraw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4)\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[x=5\\nans=\\n[1 1 1 1 0\\n 1 0 0 0 1\\n 1 1 1 1 0\\n 1 0 0 0 1\\n 1 1 1 1 0]\\nx=7\\nans=\\n[1 1 1 1 1 1 0\\n 1 0 0 0 0 0 1\\n 1 0 0 0 0 0 1\\n 1 1 1 1 1 1 0 \\n 1 0 0 0 0 0 1\\n 1 0 0 0 0 0 1\\n 1 1 1 1 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":649,"title":"Return the first and last characters of a character array","description":"Return the first and last character of a string, concatenated together. If there is only one character in the string, the function should give that character back twice since it is both the first and last character of the string.\r\n\r\nExample:\r\n\r\n   stringfirstandlast('boring example') = 'be'","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: 123.433px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 61.7167px; transform-origin: 407px 61.7167px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 63px; 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: 364px 8px; transform-origin: 364px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eReturn the first and last characters of a character array, concatenated together. If there is only one character in the character array, the function should give that character back twice since it is both the first and last character of the character array.\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: 28.5px 8px; transform-origin: 28.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: 20.4333px; 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 10.2167px; transform-origin: 404px 10.2167px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; 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: 184px 8.5px; transform-origin: 184px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 88px 8.5px; transform-origin: 88px 8.5px; \"\u003e   stringfirstandlast(\u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 64px 8.5px; text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 64px 8.5px; \"\u003e'boring example'\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; perspective-origin: 16px 8.5px; transform-origin: 16px 8.5px; \"\u003e) = \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); perspective-origin: 16px 8.5px; text-decoration: none; text-decoration-color: rgb(170, 4, 249); text-emphasis-color: rgb(170, 4, 249); transform-origin: 16px 8.5px; \"\u003e'be'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = stringfirstandlast(x)\r\n  y = x(1);\r\nend","test_suite":"%%\r\nx = 'abcde';\r\ny_correct = 'ae';\r\nassert(isequal(stringfirstandlast(x),y_correct))\r\n\r\n%%\r\nx = 'a';\r\ny_correct = 'aa';\r\nassert(isequal(stringfirstandlast(x),y_correct))\r\n\r\n%%\r\nx = 'codyrocks!';\r\ny_correct = 'c!';\r\nassert(isequal(stringfirstandlast(x),y_correct))\r\n\r\n%%\r\nx = ' ';\r\ny_correct = '  ';\r\nassert(isequal(stringfirstandlast(x),y_correct))\r\n\r\n%%\r\nx = '  ';\r\ny_correct = '  ';\r\nassert(isequal(stringfirstandlast(x),y_correct))\r\n\r\n%%\r\nx = 'az';\r\ny_correct = 'az';\r\nassert(isequal(stringfirstandlast(x),y_correct))\r\n\r\n%%\r\nx = 'abcdefghijklmnopqrstuvwxyz';\r\ny_correct = 'az';\r\nassert(isequal(stringfirstandlast(x),y_correct))\r\n\r\n%%\r\nx = '0123456789';\r\ny_correct = '09';\r\nassert(isequal(stringfirstandlast(x),y_correct))\r\n\r\n%%\r\nx = '09';\r\ny_correct = '09';\r\nassert(isequal(stringfirstandlast(x),y_correct))","published":true,"deleted":false,"likes_count":44,"comments_count":5,"created_by":134,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":11899,"test_suite_updated_at":"2021-01-20T11:13:02.000Z","rescore_all_solutions":false,"group_id":14,"created_at":"2012-05-01T18:41:40.000Z","updated_at":"2026-04-08T16:01:38.000Z","published_at":"2012-05-01T18:41:56.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\u003eReturn the first and last characters of a character array, concatenated together. If there is only one character in the character array, the function should give that character back twice since it is both the first and last character of the character array.\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[   stringfirstandlast('boring example') = 'be']]\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":52472,"title":"Vector to Decimal","description":"Given an integer vector ,  return its decimal representation  as a character array.\r\n% Examples\r\nv = 7\r\nx = '7'\r\n%\r\nv = [4 2]\r\nx = '42'\r\n%\r\nv = [0 7]\r\nx = '7'\r\n%\r\nv = [3 12]\r\nx = '42'","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: 294.048px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 406.989px 147.017px; transform-origin: 406.996px 147.024px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 44.0483px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 383.991px 22.017px; text-align: left; transform-origin: 383.999px 22.0241px; 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 an integer vector \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOgAAAAoCAYAAAD0QbbMAAAAAXNSR0IArs4c6QAACHpJREFUeF7tnXvs/9Ucxx/JopS5Jaq5baZWQmVExZjbEBnriiwKISK6uTOXIddhy61IyaVYE/qjWmXpstToYtNlKeW2GMpQe3COHe/f+/P+vM/7/fl8ev/6vs723X6/7+ec836d5znP1+28Pu/vBkQLBAKBySKwwWQlC8ECgUCAtUTQ5wPbt+z59cB3gH/EeQgElozAQ4C9gXu1POe7wK+av19LBH0nsCfwuwYIPwM+CNy25M2J6QOBRwEfAu5XQHEP4NHAfsB5a52gvwa+EeckEJgQAhsDxwInBEEhCDqhkxmi/AeBIGg6CLq4QdBgxdQQCIIGQad2JkOeAoEgaBA0CDFhBIKgQdAJH88QLQgaBA0WTBiBIGgQdMLHM0QLggZBgwUTRiAIGgSd8PEM0YKgPQm6BbAD8ARgN2Az4JXAdcUZuj/wGWBn4EjgVOCOJZwxSzC3SyVgu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KmTie+muFn/TmWEs4oLxhyUPNbnW/VkXOz3G7+cLIcZRquQbKuUZxFrGjqHBNDLuTzF/eK/yJYr7vQyrcG+Jk1ugkjLeUkqJjFb3VUH0KpE19LfZlnkpsRcgcBKEAiCrgTmeEggMAyBIOgw3GJUILASBEqCWuXh+3j02WubiRYvaJf9doFauaJ/ILBeI1AStLzzrF1U82tZteOjfyAQCLQgEC5uHItAYMIIBEEnvDkhWiAQBI0zEAhMGIEg6IQ3J0QLBO4EDo9VR8kfkDwAAAAASUVORK5CYII=\" width=\"116\" height=\"20\" style=\"width: 116px; height: 20px;\"\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\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK0AAAAlCAYAAAAwTGn2AAAAAXNSR0IArs4c6QAACNpJREFUeF7tm3fMLkUVxn8XEaMIBhuoQY0hqFE0IAR7RTEkYkURRDAICNhRsUQslIBRQBAQ1NixYGLBggpEBYmUf6SqMZYoqNiDxqgQzS+cc5277vfu7L577/3e++78c8s3Oztz5tnnPOeZ+dYwtSkCCxaBNQs232m6UwSYQDuBYOEiMIF24bZsmvAE2gkDCxeBCbQLt2XThCfQThhYuAgsC2j3Bz5V7M6XgcOA31Xs2IOBzwFHAt+v6D91+V8EmnEfEptvAo7zx3x4mUD7MuAVsfD3AjcCbwL+3hHJCbRDoHb7M3cG7lLx+B2A1wBPA44Afgk8BPgQcFHs0z+WEbQy637Ar4GHAp8BBO+ngf/MCOwE2grUzdnlSQHQY4DPAlsDpwP3AF4O/LYcf5mYVnlwAvAO4DbgxcA7gUOA706gnRN2wx/fDvgw8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Ohd0a2cS/UyNMrofQ23rA5AhoG1mghyjlAcyraxhhvDyia1W8yo5zgp27bpf0Px1lTEcF0nCrOAxap9Wuz7HbH7Ufd7T7OvhlplsbdtYt7zKOeTdTp0IbbT1cZ92nqB1PeuHbPFmcPvc8e0aN/1wGdnCV4bS31ROzCul/OhkW71fZUrN1dA+oO1a21w/Xw2gnWsBq+Bhi40nAscN0Jmzpp8Fmx+Ct74EreyurPLuqUeiGvNDpcIqCN2wKUygHRa3fEqNqAuiTBii62e9Pf1wx/e+qZrQo1817ccCtJ6s9S3I5lvxKnh6Au3wTdBV0PPURvJe6NjN6t7iz3se/v6UKV2Nq77T7rIit1hcujaBdum2fPEXPIF28fdw6VYwgXbptnzxFzyBdvH3cOlWMIF26bZ88Rc8gXbx93DpVvBfLuEURHMmVwwAAAAASUVORK5CYII=\" width=\"86.5\" height=\"18.5\" style=\"width: 86.5px; height: 18.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 return its decimal representation \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALcAAAAtCAYAAADsk/q6AAAAAXNSR0IArs4c6QAACZpJREFUeF7tnGnMLEUVhh/UuCuKCKhs/jBCZFNwV0QiihoBCYhsggoiuKAS94AbqEAUXEFEQRRconEhrP5gUwMEiIpGZElUEBcQNW5xJw85RZpOz0z1TPfcmemq5Obem6+7uurUW6fe855T31qUViywohZYa0XnVaZVLEABdwHBylqggHtll7ZMrIC7YGBlLVDAvbJLWyZWwF0wsGwWeDDwMGAL4NHAV4G/NU1iCOB+GnAh8JCeV/G1wGd6/kbpHgT3s4DPA18D3g78c6jgfij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EJueCuVv2lfEZdfky11BZhzSPhNTWwfbEObv/vnUM9gjvS2yvm772EqZaZovvEu02BmoJVQF+TJZ7TGCEFkF4PkwbMkj2b5vu+U9WXVT8MFvXKTcCup5/Vv10f10swjvKgueB2PKnk1TWvVv0lrKjoWPLadanwtPYb+14d3NsApnotNtd4Zhytx01e+Snxc48wPflfI329bF47pd29OdJlACkA9W6qHjmUIYFbqjep9LaafrY0VRpj09OP25jeiDGLaLPUQLoxrrzXgrKk8bvZkuRrrkPd3USep/bdae5ekNlBp3Vwe0xLPTz+lKjUMas3VdRDjdZNteu9/bfXkJatGTAZsBlDdBlA6iXNBejdcurDlfakRXrrSfUjKZFm/GOBkFRQXt70Ha+Jqbg4T4M+nZVNQMqVrQ3xQsEoxctTzXf948nmupui912/uSZOudYYm8S5W3e4BC/0FUAKCGugrWHu4wZ8PRhfaBluEXAwNHD3FUDqKVUYDAjrmcYu1jml6qUvUgaVnatmrDnpYlwL3ceQwJ0CSOOI6v2/WRdIXdqMoVRtlIQ26zeSqiIVMYsouOXd6vNewXpM0MMcKjTrWJbm/aGAOwWQ3v3rIrVujYf1HWbrpAsmV+SmSnNd/QqDKohSgsWA0Bvo8m+TavJfebDgNkZaCi48r90xBHCnij/lPn+33DQXKgSvSpL0QzVBRaTeRmnDXaylqfHqLXI3q5vKhI/f9SRaePWiC0O06WMI4DaAVI0w8dBnK78Is0/rTtH3EMA9hVnKK6tggQLuVVjFModGCxRwF2CsrAUKuFd2acvECrgLBlbWAgXcK7u0ZWIF3AUDK2uBAu6VXdoysTsBKDYfTEiTeiQAAAAASUVORK5CYII=\" width=\"91.5\" height=\"22.5\" style=\"width: 91.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 as a character array.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 240px; 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: 403.991px 120px; transform-origin: 403.999px 120px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration: none; text-decoration-color: rgb(2, 128, 9); \"\u003e% Examples\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ev = 7\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ex = \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003e'7'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration: none; text-decoration-color: rgb(2, 128, 9); \"\u003e%\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ev = [4 2]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ex = \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003e'42'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration: none; text-decoration-color: rgb(2, 128, 9); \"\u003e%\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ev = [0 7]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ex = \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003e'7'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration: none; text-decoration-color: rgb(2, 128, 9); \"\u003e%\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ev = [3 12]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; 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: 0.994318px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.994318px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.994318px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.994318px; 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: 403.991px 10px; transform-origin: 403.999px 10px; 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 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ex = \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003e'42'\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function x = vector2dec(v)\r\n  x = ['' v + '0'];\r\nend","test_suite":"%% Example EASY 1\r\nv = 7;\r\nx_correct = '7';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% Example EASY 2\r\nv = [4 2];\r\nx_correct = '42';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% Example tricky 1\r\nv = [0 7];\r\nx_correct = '7';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% Example tricky 2\r\nv = [3 12];\r\nx_correct = '42';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% in Z test 1\r\nv = 0;\r\nx_correct = '0';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% in Z test 2\r\nv = -1;\r\nx_correct = '-1';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% in Z test 3\r\nv = [-4 -2];\r\nx_correct = '-42';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% in Z test 4\r\nv = [1 -5 -8];\r\nx_correct = '42';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% Medium number test 1\r\nv = '123456789' - '0';\r\nx_correct = '123456789';\r\nassert(isequal(vector2dec(v),x_correct))\r\n\r\n%% Medium number test 2\r\nv = randi(10, 1, 10) - 1;\r\nif v(1) == 0\r\n    v(1) = 1;\r\nend\r\nx_correct = v + '0';\r\nassert(isequal(vector2dec(v),x_correct))\r\nassert(isequal(vector2dec(-v), ['-' x_correct]))\r\n\r\n%% Big number test 1\r\nv = randi(10, 1, 10000) - 1;\r\nif v(1) == 0\r\n    v(1) = 1;\r\nend\r\nx_correct = v + '0';\r\nassert(isequal(vector2dec(v.'),x_correct))\r\n\r\n%% Big number test 2\r\nn = 10000;\r\nrng('shuffle');\r\nv_correct = randi(10, 1, n) - 1;\r\nif v_correct(1) == 0\r\n    v_correct(1) = 1;\r\nend\r\nx_correct = v_correct + '0';\r\nv = v_correct;\r\nfor ii = 1:3\r\n    dk = randperm(n - 4, fix(n/2));\r\n    dv = randi(10, 1, fix(n/2)) - 5;\r\n    dE = randi(4, 1, fix(n/2));\r\n    [~, loc] = unique(dk + dE);\r\n    dk = dk(loc);\r\n    dv = dv(loc);\r\n    dE = dE(loc);\r\n    v(dk) = v(dk) + dv;\r\n    v(dk + dE) = v(dk + dE) - dv.*(10.^dE);\r\nend\r\nrng('shuffle');\r\n\r\nassert(isequal(vector2dec(v),x_correct))\r\nassert(isequal(vector2dec(-v), ['-' x_correct]))\r\n\r\n%% Shame Test 1\r\nfileText = fileread('vector2dec.m');\r\nFORBIDDEN_ = {'eval', 'mlock', 'munlock', 'fileread'};\r\n% Filters very obvious cheating\r\nif contains(fileText, FORBIDDEN_)\r\n    for k = 1:10000\r\n        disp('SHAME')\r\n    end\r\n    assert(false);\r\nend\r\n\r\n%% Shame Test 2\r\nfileText = fileread('vector2dec.m');\r\nFORBIDDEN_ = {'!', '?@'};\r\n% Filters cheating, may trigger false positives\r\nassert(~contains(fileText, FORBIDDEN_), '! and ?@ are forbidden')","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":543257,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":5,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-08-10T17:20:12.000Z","updated_at":"2021-08-11T00:05:08.000Z","published_at":"2021-08-11T00:05: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\u003eGiven an integer vector \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\\\\underline{v} = [v_0, v_1,~...~, v_n]\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\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 \\\\in{} \\\\mathbb{N}, v_k   \\\\in{} \\\\mathbb{Z}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e return its decimal representation \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\u003ex=\\\\sum{}v_k10^{n-k}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e as a character array.\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[% Examples\\nv = 7\\nx = '7'\\n%\\nv = [4 2]\\nx = '42'\\n%\\nv = [0 7]\\nx = '7'\\n%\\nv = [3 12]\\nx = '42']]\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":466,"title":"Compress strings (not springs)","description":"Please remove excess space, limit one space between others, and no space before punctuation marks.\r\n \r\n* For example, 'Trendy ,    Cody  ,    Contest .' \r\n* should be ---- 'Trendy, Cody, Contest.'","description_html":"\u003cp\u003ePlease remove excess space, limit one space between others, and no space before punctuation marks.\u003c/p\u003e\u003cul\u003e\u003cli\u003eFor example, 'Trendy ,    Cody  ,    Contest .'\u003c/li\u003e\u003cli\u003eshould be ---- 'Trendy, Cody, Contest.'\u003c/li\u003e\u003c/ul\u003e","function_template":"function y = cozy_cody(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx='Blogs  ,    Trendy  ,    Cody  ,    Contest .';\r\ny='Blogs, Trendy, Cody, Contest.';\r\nassert(isequal(cozy_cody(x),y))\r\n\r\n%%\r\nx='Trendy ,                      Cody ,                          Contest .';\r\ny='Trendy, Cody, Contest.';\r\nassert(isequal(cozy_cody(x),y))\r\n\r\n%%\r\nx='One Two  Three   Four    Five     Six      Seven       Eight        Nine         Ten';\r\ny='One Two Three Four Five Six Seven Eight Nine Ten';\r\nassert(isequal(cozy_cody(x),y))\r\n\r\n%%\r\nx='1, 2,  3,   4,    5,     6,      7,       8,        9,         10';\r\ny='1, 2, 3, 4, 5, 6, 7, 8, 9, 10';\r\nassert(isequal(cozy_cody(x),y))\r\n\r\n%%\r\nx='1   , and 3  ,  and 7 ,   and                             12';\r\ny='1, and 3, and 7, and 12';\r\nassert(isequal(cozy_cody(x),y))\r\n\r\n%%\r\nx='Hello                                            There          !';\r\ny='Hello There!';\r\nassert(isequal(cozy_cody(x),y))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":166,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":219,"test_suite_updated_at":"2016-12-12T17:16:34.000Z","rescore_all_solutions":false,"group_id":14,"created_at":"2012-03-07T17:51:28.000Z","updated_at":"2026-03-11T20:56:15.000Z","published_at":"2012-03-13T14:50:34.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\u003ePlease remove excess space, limit one space between others, and no space before punctuation marks.\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, 'Trendy , Cody , Contest .'\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\u003eshould be ---- 'Trendy, Cody, Contest.'\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:\"character\"","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:\"character\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"character\"","","\"","character","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007effc4a78cb0\u003e":null,"#\u003cMathWorks::Search::Field:0x00007effc4a78c10\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007effc4a78350\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007effc4a78f30\u003e":1,"#\u003cMathWorks::Search::Field:0x00007effc4a78e90\u003e":50,"#\u003cMathWorks::Search::Field:0x00007effc4a78df0\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007effc4a78d50\u003e":"tag:\"character\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007effc4a78d50\u003e":"tag:\"character\""},"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":"cody-search","password":"78X075ddcV44","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:\"character\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"character\"","","\"","character","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007effc4a78cb0\u003e":null,"#\u003cMathWorks::Search::Field:0x00007effc4a78c10\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007effc4a78350\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007effc4a78f30\u003e":1,"#\u003cMathWorks::Search::Field:0x00007effc4a78e90\u003e":50,"#\u003cMathWorks::Search::Field:0x00007effc4a78df0\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007effc4a78d50\u003e":"tag:\"character\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007effc4a78d50\u003e":"tag:\"character\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":44686,"difficulty_rating":"easy-medium"},{"id":44646,"difficulty_rating":"easy-medium"},{"id":44685,"difficulty_rating":"easy-medium"},{"id":649,"difficulty_rating":"easy-medium"},{"id":52472,"difficulty_rating":"medium"},{"id":466,"difficulty_rating":"medium"}]}}