{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2025-12-14T01:33:56.000Z","description":"Problems submitted by members of the MATLAB Central community.","is_default":true,"created_by":161519,"badge_id":null,"featured":false,"trending":false,"solution_count_in_trending_period":0,"trending_last_calculated":"2025-12-14T00:00:00.000Z","image_id":null,"published":true,"community_created":false,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"description_opc":null,"description_html":null,"published_at":null},"problems":[{"id":44302,"title":"Check if inputted variable is a string or a number","description":"Check if a inputted variable is a number or a string, given a string input (i.e. '1' is 1 and thus a number, 'a' is a string).","description_html":"\u003cp\u003eCheck if a inputted variable is a number or a string, given a string input (i.e. '1' is 1 and thus a number, 'a' is a string).\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = ...;\r\nend","test_suite":"%%\r\nx = '1';\r\ny_correct = 1;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n\r\n%%\r\nx = 1;\r\ny_correct = 0;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n\r\n%%\r\nx = '42';\r\ny_correct = 1;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n\r\n%%\r\nx = 42;\r\ny_correct = 0;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n\r\n%%\r\nx = 'i';\r\ny_correct = 1;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n\r\n%%\r\nx = i;\r\ny_correct = 0;\r\nassert(isequal(your_fcn_name(x),y_correct))","published":true,"deleted":false,"likes_count":0,"comments_count":1,"created_by":12852,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":92,"test_suite_updated_at":"2017-09-08T19:45:32.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2017-09-06T01:19:10.000Z","updated_at":"2026-03-09T20:44:38.000Z","published_at":"2017-09-06T01:19:10.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eCheck if a inputted variable is a number or a string, given a string input (i.e. '1' is 1 and thus a number, 'a' is a string).\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":1731,"title":"Text File Read: 64 bit data set","description":"This Challenge is to read a text file that has vary large integers up to 2e18, typical for Google Code Jam. These values are well within the bounds of uint64.\r\nThe data is an array of Q pairs.\r\nInput: [Q, fname] The number of lines in the file and its filename.\r\nOutput: M a uint64 matrix of size(Q,2)\r\nExample:\r\nInput: {4, 'Cody_64.txt']\r\nThe text file:\r\n308436464205151562 1850618785230909388\r\n373665302816212423 1494661211264849698\r\n760961177192651897 1521922354385303795\r\n1 2000000000000000000\r\n\r\nOuput: A uint64 (4,2) matrix to full precision.\r\nNote of Warning:\r\nThe fscanf function with %ul may not succeed, as of 7/20/2013.\r\nThe result window has a case showing the function output\r\nRelated Challenges:\r\n1) Bullseye Large Numbers r\u003c1E18, P\u003c2E18\r\n2) Super Large Numbers \u003e2^64  (Java BigInteger methods)","description_html":"\u003cdiv style = \"text-align: start; line-height: 20px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: normal; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"display: block; min-width: 0px; padding-top: 0px; vertical-align: baseline; \"\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003eThis Challenge is to read a text file that has vary large integers up to 2e18, typical for\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eGoogle Code Jam\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003e. These values are well within the bounds of uint64.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003eThe data is an array of Q pairs.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"font-weight: bold; \"\u003eInput:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003e [Q, fname] The number of lines in the file and its filename.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"font-weight: bold; \"\u003eOutput:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003e M a uint64 matrix of size(Q,2)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"font-weight: bold; \"\u003eExample:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-bottom: 10px; margin-left: 3px; margin-right: 3px; margin-top: 10px; 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-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003eInput: {4, \u003c/span\u003e\u003cspan style=\"border-block-end: 0px none rgb(170, 4, 249); border-block-start: 0px none rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end: 0px none rgb(170, 4, 249); border-inline-start: 0px none 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-right: 0px; outline-color: rgb(170, 4, 249); text-decoration-color: rgb(170, 4, 249); \"\u003e'Cody_64.txt'\u003c/span\u003e\u003cspan style=\"margin-right: 0px; \"\u003e]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003eThe \u003c/span\u003e\u003cspan style=\"border-block-end: 0px none rgb(170, 4, 249); border-block-start: 0px none rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end: 0px none rgb(170, 4, 249); border-inline-start: 0px none 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-right: 0px; outline-color: rgb(170, 4, 249); text-decoration-color: rgb(170, 4, 249); \"\u003etext file:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003e308436464205151562 1850618785230909388\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003e373665302816212423 1494661211264849698\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003e760961177192651897 1521922354385303795\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003e1 2000000000000000000\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003eOuput: A uint64 (4,2) matrix \u003c/span\u003e\u003cspan style=\"border-block-end: 0px none rgb(170, 4, 249); border-block-start: 0px none rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end: 0px none rgb(170, 4, 249); border-inline-start: 0px none 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-right: 0px; outline-color: rgb(170, 4, 249); text-decoration-color: rgb(170, 4, 249); \"\u003eto full precision.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 10px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"font-weight: bold; \"\u003eNote of Warning:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003eThe fscanf function with %ul may not succeed, as of 7/20/2013.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003eThe result window has a case showing the function output\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"font-weight: bold; \"\u003eRelated Challenges:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-bottom: 10px; margin-left: 3px; margin-right: 3px; margin-top: 10px; 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-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003e1) Bullseye \u003c/span\u003e\u003cspan style=\"border-block-end: 0px none rgb(170, 4, 249); border-block-start: 0px none rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end: 0px none rgb(170, 4, 249); border-inline-start: 0px none 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-right: 0px; outline-color: rgb(170, 4, 249); text-decoration-color: rgb(170, 4, 249); \"\u003eLarge Numbers r\u0026lt;1E18\u003c/span\u003e\u003cspan style=\"margin-right: 0px; \"\u003e, P\u0026lt;2E18\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003e2) Super \u003c/span\u003e\u003cspan style=\"border-block-end: 0px none rgb(170, 4, 249); border-block-start: 0px none rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end: 0px none rgb(170, 4, 249); border-inline-start: 0px none 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-right: 0px; outline-color: rgb(170, 4, 249); text-decoration-color: rgb(170, 4, 249); \"\u003eLarge Numbers \u0026gt;2^64\u003c/span\u003e\u003cspan style=\"margin-right: 0px; \"\u003e  \u003c/span\u003e\u003cspan style=\"border-block-end: 0px none rgb(170, 4, 249); border-block-start: 0px none rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end: 0px none rgb(170, 4, 249); border-inline-start: 0px none 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-right: 0px; outline-color: rgb(170, 4, 249); text-decoration-color: rgb(170, 4, 249); \"\u003e(Java BigInteger methods)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function [m]=read_input64(Q,fn)\r\n m=zeros(Q,2,'uint64');\r\nend","test_suite":"%%\r\nfid=fopen('Cody_64.txt','w');\r\n fprintf(fid,'%s\\n','308436464205151562 1850618785230909388');\r\n fprintf(fid,'%s\\n','760961177192651897 1521922354385303795');\r\n fprintf(fid,'%s\\n','23875933057623902 1098292920650700527');\r\n fprintf(fid,'%s\\n','1000 2000000000000000000');\r\nfclose(fid);\r\n%%\r\n% This section has no assert to show the values being returned\r\nQ=4;\r\nfn='Cody_64.txt';\r\nm=read_input64(Q,fn)\r\n%%\r\nQ=4;\r\nfn='Cody_64.txt';\r\nm=read_input64(Q,fn)\r\nm_exp=[uint64(308436464205151562) uint64(1850618785230909388);uint64(760961177192651897) uint64(1521922354385303795);uint64(23875933057623902) uint64(1098292920650700527);1000 2000000000000000000];\r\nassert(isequal(m,m_exp));\r\n%%\r\nQ=4;\r\nm_exp=randi(2^31,Q,2);\r\nfn='Cody_64a.txt';\r\nfid=fopen(fn,'w');\r\nfor i=1:Q\r\n fprintf(fid,'%s %s\\n',num2str(m_exp(i,1)),num2str(m_exp(i,2)));\r\nend\r\nfclose(fid);\r\nm=read_input64(Q,fn);\r\nassert(isequal(m,m_exp))\r\n%%\r\nQ=8;\r\nm_exp=randi(2^31,Q,2)*2^19;\r\nfn='Cody_64.txt';\r\nfid=fopen(fn,'w');\r\nfor i=1:Q\r\n fprintf(fid,'%s %s\\n',num2str(m_exp(i,1)),num2str(m_exp(i,2)));\r\nend\r\nfclose(fid);\r\nm=read_input64(Q,fn);\r\nassert(isequal(m,m_exp))\r\n\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":4,"created_by":3097,"edited_by":26769,"edited_at":"2022-04-12T15:26:08.000Z","deleted_by":null,"deleted_at":null,"solvers_count":13,"test_suite_updated_at":"2022-04-12T15:26:08.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-07-21T01:54:32.000Z","updated_at":"2022-04-12T15:26:08.000Z","published_at":"2013-07-21T02:56:48.000Z","restored_at":null,"restored_by":null,"spam":null,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThis Challenge is to read a text file that has vary large integers up to 2e18, typical for\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. These values are well within the bounds of uint64.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe data is an array of Q pairs.\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e [Q, fname] The number of lines in the file and its filename.\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e M a uint64 matrix of size(Q,2)\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[Input: {4, 'Cody_64.txt']\\nThe text file:\\n308436464205151562 1850618785230909388\\n373665302816212423 1494661211264849698\\n760961177192651897 1521922354385303795\\n1 2000000000000000000\\n\\nOuput: A uint64 (4,2) matrix to full precision.]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eNote of Warning:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe fscanf function with %ul may not succeed, as of 7/20/2013.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe result window has a case showing the function output\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eRelated Challenges:\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[1) Bullseye Large Numbers r\u003c1E18, P\u003c2E18\\n2) Super Large Numbers \u003e2^64  (Java BigInteger methods)]]\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":1532,"title":"SLP Calculation","description":"The SLP Calculation Challenge is to implement SLP sequences and output the result as a string. SLP, Straight Line Program, creates a value based upon two pointers of prior values and one of the operators [ + - * ]. The first value in the sequence is 1 and is assigned pointer 0 (zero based indexing).\r\n\r\n*Input:* SLP_sequence (string)\r\n\r\n*Output:* SLP_value (string)\r\n\r\n*Example:*\r\n\r\n*Input:*\r\nSLP_sequence='0+0,1+1,2*2,3+1,3*4,5-3,6+0,5*1,5*7,9+8,9*10';\r\n\r\nProduces:( Index 0 is 1 )\r\n\r\n2, 4, 16, 18, 288, 272, 273, 576, 78624, 79200, 6227020800\r\n\r\n*Output:*\r\n'6227020800' \r\n\r\nThe complexity to this Challenge is some solutions will exceed 2^64 and have eps\u003e1.\r\n\r\nPrior to viewing the link: What number is 2568 digits long and has 249 trailing zeros?\r\n\r\n\u003chttp://www.azspcs.net/ Al's Contests\u003e\r\n\r\n\r\n\r\n\r\n ","description_html":"\u003cp\u003eThe SLP Calculation Challenge is to implement SLP sequences and output the result as a string. SLP, Straight Line Program, creates a value based upon two pointers of prior values and one of the operators [ + - * ]. The first value in the sequence is 1 and is assigned pointer 0 (zero based indexing).\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e SLP_sequence (string)\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e SLP_value (string)\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e\r\nSLP_sequence='0+0,1+1,2*2,3+1,3*4,5-3,6+0,5*1,5*7,9+8,9*10';\u003c/p\u003e\u003cp\u003eProduces:( Index 0 is 1 )\u003c/p\u003e\u003cp\u003e2, 4, 16, 18, 288, 272, 273, 576, 78624, 79200, 6227020800\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e\r\n'6227020800'\u003c/p\u003e\u003cp\u003eThe complexity to this Challenge is some solutions will exceed 2^64 and have eps\u003e1.\u003c/p\u003e\u003cp\u003ePrior to viewing the link: What number is 2568 digits long and has 249 trailing zeros?\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://www.azspcs.net/\"\u003eAl's Contests\u003c/a\u003e\u003c/p\u003e","function_template":"function SLP = SLP_calc(SLP_str)\r\n  SLP = '0';\r\nend","test_suite":"SLP_str='0+0,1+1,2*2,3+1,3*4,5-3,6+0,5*1,5*7,9+8,9*10';\r\n\r\nSLP = SLP_calc(SLP_str);\r\nSLP_exp='6227020800';\r\n\r\nassert(strcmp(SLP,SLP_exp),sprintf('%s\\n',SLP));\r\n%%\r\nSLP_str='0+0,1*1,1+2,3*3,3*4,5-3,6-4,2+5,8+2,5*6,8*9,7*11,8*10,13+10,8+14,2*13,12*15,14*16,17*18,18*19';\r\n\r\nSLP = SLP_calc(SLP_str);\r\nSLP_exp='13763753091226345046315979581580902400000000';\r\n\r\nassert(strcmp(SLP,SLP_exp),sprintf('%s\\n',SLP));\r\n%%\r\nSLP_str='0+0, 1+1, 2*2, 3-1, 3+4, 5+1, 5+4, 7+3, 8+6, 9+2, 4*4, 11+5, 8*4, 13+0, 14-12, 15+5, 8*5, 17-3, 10*9, 13*10, 15*15, 21-2, 22-19, 23-4, 21+16, 25+3, 16*16, 27-11, 28-2, 27-7, 30+2, 29+11, 32-19, 13*13, 34-2, 35-19, 27+29, 17*17, 38-2, 39-19, 39-10, 41-7, 38+2, 20*7, 44-27, 44+11, 44+35, 20*10, 48-47, 48+30, 50-40, 51-3, 50+27, 44*2, 54-35, 55-37, 55-13, 57-48, 55+9, 59-35, 60+11, 61-44, 62-53, 61+15, 60+13, 59+19, 66-62, 67-21, 52-68, 68+5, 54-24, 71-46, 59+24, 73+19, 74-26, 61+45, 66+61, 77-41, 78-63, 77-22, 80+28, 80+50, 82-13, 83+35, 84-60, 85-64, 81-86, 85+43, 88+39, 77+64, 35*36, 91+54, 92-44, 92+37, 93*91, 95*92, 93+48, 96*97, 39*40, 99-93, 99+54, 101-44, 102*99, 103*101, 102+48, 104*105, 22*23, 106*107, 107+54, 109-44, 108*110, 111*109, 110+48, 113-1, 112*113, 32*33, 115*116, 116+54, 118-114, 118-44, 117*120, 121*118, 120+48, 122*123, 124*94, 125*119, 126*30, 127*28, 98*46, 128*100, 57*31, 131*56, 130*60, 132*58, 129*61, 133*64, 134*62, 53*41, 136*51, 137*63, 135*52, 138*24, 139*71, 141*73, 144*72, 143*67, 146*68, 65*70, 147*80, 78*59, 145*90, 140*82, 142*83, 149*84, 86*37, 154*88, 148*89, 153*25, 151*26, 156*76, 75*42, 160*49, 162*87, 152*69, 163*79, 157*18, 81-52, 167+6, 164*15, 165*5, 30-15, 171-3, 150*172, 43+31, 66+59, 175+14, 176*174, 30-25, 166*178, 35-23, 180-17, 181*20, 82-33, 183*12, 60-30, 184*185, 71-40, 187*39, 188*7, 33-18, 44*190, 186*182, 192*168, 179*182, 193*177, 194*155, 169*168, 196*161, 195*173, 197*155, 198*158, 159*177, 202*161, 203*200, 170*173, 205*158, 206*200, 191*34, 208*208, 209*189, 210*210, 211*199, 212*212, 213*201, 214*214, 215*204, 216*216, 217*207';\r\n\r\ntic\r\nSLP = SLP_calc(SLP_str);\r\ntoc\r\nSLP_exp='402387260077093773543702433923003985719374864210714632543799910429938512398629020592044208486969404800479988610197196058631666872994808558901323829669944590997424504087073759918823627727188732519779505950995276120874975462497043601418278094646496291056393887437886487337119181045825783647849977012476632889835955735432513185323958463075557409114262417474349347553428646576611667797396668820291207379143853719588249808126867838374559731746136085379534524221586593201928090878297308431392844403281231558611036976801357304216168747609675871348312025478589320767169132448426236131412508780208000261683151027341827977704784635868170164365024153691398281264810213092761244896359928705114964975419909342221566832572080821333186116811553615836546984046708975602900950537616475847728421889679646244945160765353408198901385442487984959953319101723355556602139450399736280750137837615307127761926849034352625200015888535147331611702103968175921510907788019393178114194545257223865541461062892187960223838971476088506276862967146674697562911234082439208160153780889893964518263243671616762179168909779911903754031274622289988005195444414282012187361745992642956581746628302955570299024324153181617210465832036786906117260158783520751516284225540265170483304226143974286933061690897968482590125458327168226458066526769958652682272807075781391858178889652208164348344825993266043367660176999612831860788386150279465955131156552036093988180612138558600301435694527224206344631797460594682573103790084024432438465657245014402821885252470935190620929023136493273497565513958720559654228749774011413346962715422845862377387538230483865688976461927383814900140767310446640259899490222221765904339901886018566526485061799702356193897017860040811889729918311021171229845901641921068884387121855646124960798722908519296819372388642614839657382291123125024186649353143970137428531926649875337218940694281434118520158014123344828015051399694290153483077644569099073152433278288269864602789864321139083506217095002597389863554277196742822248757586765752344220207573630569498825087968928162753848863396909959826280956121450994871701244516461260379029309120889086942028510640182154399457156805941872748998094254742173582401063677404595741785160829230135358081840096996372524230560855903700624271243416909004153690105933983835777939410970027753472000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000';\r\n\r\n\r\nassert(strcmp(SLP,SLP_exp),sprintf('%s\\n',SLP));\r\n\r\n\r\n\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":7,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-06-01T21:37:49.000Z","updated_at":"2013-06-01T22:56:28.000Z","published_at":"2013-06-01T22:56:28.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe SLP Calculation Challenge is to implement SLP sequences and output the result as a string. SLP, Straight Line Program, creates a value based upon two pointers of prior values and one of the operators [ + - * ]. The first value in the sequence is 1 and is assigned pointer 0 (zero based indexing).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e SLP_sequence (string)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e SLP_value (string)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e SLP_sequence='0+0,1+1,2*2,3+1,3*4,5-3,6+0,5*1,5*7,9+8,9*10';\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\u003eProduces:( Index 0 is 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\u003e2, 4, 16, 18, 288, 272, 273, 576, 78624, 79200, 6227020800\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e '6227020800'\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe complexity to this Challenge is some solutions will exceed 2^64 and have eps\u0026gt;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\u003ePrior to viewing the link: What number is 2568 digits long and has 249 trailing zeros?\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:hyperlink w:docLocation=\\\"http://www.azspcs.net/\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eAl's Contests\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":724,"title":"QWERTY Shift Code Decoder","description":"Decode a string encoded using the QWERTY shift code.\r\n\r\nQWERTY shift code is where the message was touch typed but with an offset of one character to the right.\r\n\r\nOnly letters are encoded as the top row does not incur shifting.\r\n\r\n(eg) \"A\" became \"S\" and \"a\" became \"s\"\r\n\r\n\"PpLlMm\" became \"{[:;\u003c,\"\r\n\r\nAn encoded message never contains any \"QqAaZz\" letters.\r\n\r\nIllegal characters in the original message were \"{[:;\u003c,\".\r\n\r\nDecode \"A-Za-z\".\r\nAll other characters are normal except for the Illegal characters.\r\n\r\n*Input:*\r\n\r\nencoded_str= \"Upi ,odd\"\r\n\r\n\r\n*Output:*\r\n\r\ndecoded_str= \"You miss\"\r\n\r\n\r\n","description_html":"\u003cp\u003eDecode a string encoded using the QWERTY shift code.\u003c/p\u003e\u003cp\u003eQWERTY shift code is where the message was touch typed but with an offset of one character to the right.\u003c/p\u003e\u003cp\u003eOnly letters are encoded as the top row does not incur shifting.\u003c/p\u003e\u003cp\u003e(eg) \"A\" became \"S\" and \"a\" became \"s\"\u003c/p\u003e\u003cp\u003e\"PpLlMm\" became \"{[:;\u0026lt;,\"\u003c/p\u003e\u003cp\u003eAn encoded message never contains any \"QqAaZz\" letters.\u003c/p\u003e\u003cp\u003eIllegal characters in the original message were \"{[:;\u0026lt;,\".\u003c/p\u003e\u003cp\u003eDecode \"A-Za-z\".\r\nAll other characters are normal except for the Illegal characters.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eencoded_str= \"Upi ,odd\"\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e\u003c/p\u003e\u003cp\u003edecoded_str= \"You miss\"\u003c/p\u003e","function_template":"function decoded_str = Qwerty_decode(str)\r\n  decoded_str=str;\r\nend","test_suite":"%%\r\ns='ThE qUiCk BrOwN fOx JuMpEd OvEr ThE lAzY dOg';\r\nse = 'YjR wIoVl NtPeM gPc Ki\u003c[Rf PbRt YjR ;SxU fPh';\r\nassert(isequal(Qwerty_decode(se),s))\r\n%%\r\ns='abcdefghijklmnopqrstuvwxyz';\r\nse='snvfrghjokl;,mp[wtdyibecux'; % a-z\r\nassert(isequal(Qwerty_decode(se),s))\r\n%%\r\ns='ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\nse='SNVFRGHJOKL:\u003cMP{WTDYIBECUX'; % A-Z\r\nassert(isequal(Qwerty_decode(se),s))\r\n%%\r\ns='You miss 100 percent of the shots you never take. Gretzky';\r\nse='Upi ,odd 100 [rtvrmy pg yjr djpyd upi mrbrt yslr. Htryxlu';\r\nassert(isequal(Qwerty_decode(se),s))\r\n%%\r\ns='Those who believe in telekinetics raise my hand. Vonnegut';\r\nse='Yjpdr ejp nr;orbr om yr;rlomryovd tsodr ,u jsmf. Bpmmrhiy';\r\nassert(isequal(Qwerty_decode(se),s))","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":230,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":14,"created_at":"2012-05-27T19:05:49.000Z","updated_at":"2026-03-30T18:09:29.000Z","published_at":"2012-05-27T19:08:04.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\u003eDecode a string encoded using the QWERTY shift code.\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\u003eQWERTY shift code is where the message was touch typed but with an offset of one character to the right.\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\u003eOnly letters are encoded as the top row does not incur shifting.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e(eg) \\\"A\\\" became \\\"S\\\" and \\\"a\\\" became \\\"s\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\\\"PpLlMm\\\" became \\\"{[:;\u0026lt;,\\\"\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\u003eAn encoded message never contains any \\\"QqAaZz\\\" letters.\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\u003eIllegal characters in the original message were \\\"{[:;\u0026lt;,\\\".\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\u003eDecode \\\"A-Za-z\\\". All other characters are normal except for the Illegal characters.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\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\u003eencoded_str= \\\"Upi ,odd\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\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\u003edecoded_str= \\\"You miss\\\"\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":723,"title":"QWERTY Shift Encoder","description":"Encode a string using the QWERTY shift code.\r\nThis code is where you touch type but are offset by one character to the right.\r\nOnly letters are encoded as the top row shifting does not occur.\r\n(eg) \"A\" becomes \"S\" and \"a\" becomes \"s\"\r\n\"PpLlMm\" becomes \"{[:;\u003c,\"\r\nAn encoded message will never have any \"QqAaZz\" letters.\r\nIllegal characters in the original message are \"{{:;\u003c,\".\r\nEncode \"A-Za-z\". All other characters are normal except for the Illegal characters.\r\nInput:\r\nstr= \"You miss\"\r\nOutput:\r\nencoded_str= \"Upi ,odd\"","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: 351px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 175.5px; transform-origin: 407px 175.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 147.5px 8px; transform-origin: 147.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eEncode a string using the QWERTY shift code.\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: 245px 8px; transform-origin: 245px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThis code is where you touch type but are offset by one character to the right.\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: 199.5px 8px; transform-origin: 199.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eOnly letters are encoded as the top row shifting does not occur.\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: 132.5px 8px; transform-origin: 132.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e(eg) \"A\" becomes \"S\" and \"a\" becomes \"s\"\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: 82px 8px; transform-origin: 82px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\"PpLlMm\" becomes \"{[:;\u0026lt;,\"\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: 186px 8px; transform-origin: 186px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eAn encoded message will never have any \"QqAaZz\" letters.\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: 165px 8px; transform-origin: 165px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eIllegal characters in the original message are \"{{:;\u0026lt;,\".\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: 255.5px 8px; transform-origin: 255.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eEncode \"A-Za-z\". All other characters are normal except for the Illegal characters.\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: 20px 8px; transform-origin: 20px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eInput:\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: 47px 8px; transform-origin: 47px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003estr= \"You miss\"\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: 26px 8px; transform-origin: 26px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eOutput:\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: 76.5px 8px; transform-origin: 76.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eencoded_str= \"Upi ,odd\"\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function encoded_str = Qwerty_encode(str)\r\n  encoded_str=str;\r\nend","test_suite":"%%\r\ns='ThE qUiCk BrOwN fOx JuMpEd OvEr ThE lAzY dOg';\r\nse = 'YjR wIoVl NtPeM gPc Ki\u003c[Rf PbRt YjR ;SxU fPh';\r\nassert(isequal(Qwerty_encode(s),se))\r\n%%\r\ns='abcdefghijklmnopqrstuvwxyz';\r\nse='snvfrghjokl;,mp[wtdyibecux'; % a-z\r\nassert(isequal(Qwerty_encode(s),se))\r\n%%\r\ns='ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\nse='SNVFRGHJOKL:\u003cMP{WTDYIBECUX'; % A-Z\r\nassert(isequal(Qwerty_encode(s),se))\r\n%%\r\ns='You miss 100 percent of the shots you never take. Gretzky';\r\nse='Upi ,odd 100 [rtvrmy pg yjr djpyd upi mrbrt yslr. Htryxlu';\r\nassert(isequal(Qwerty_encode(s),se))\r\n%%\r\ns='Those who believe in telekinetics raise my hand. Vonnegut';\r\nse='Yjpdr ejp nr;orbr om yr;rlomryovd tsodr ,u jsmf. Bpmmrhiy';\r\nassert(isequal(Qwerty_encode(s),se))\r\n%%\r\ns='';\r\nse='';\r\nassert(isequal(Qwerty_encode(s),se))\r\n%%\r\nstr='qwerty';\r\nidx=randi(5)\r\ns=str(idx);\r\nse=str(idx+1);\r\nassert(isequal(Qwerty_encode(s),se))\r\n\r\n","published":true,"deleted":false,"likes_count":5,"comments_count":0,"created_by":3097,"edited_by":223089,"edited_at":"2023-01-27T15:14:11.000Z","deleted_by":null,"deleted_at":null,"solvers_count":250,"test_suite_updated_at":"2023-01-27T15:14:11.000Z","rescore_all_solutions":false,"group_id":14,"created_at":"2012-05-26T07:24:15.000Z","updated_at":"2026-03-13T21:49:17.000Z","published_at":"2012-05-27T18:56:31.000Z","restored_at":null,"restored_by":null,"spam":null,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEncode a string using the QWERTY shift code.\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\u003eThis code is where you touch type but are offset by one character to the right.\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\u003eOnly letters are encoded as the top row shifting does not occur.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e(eg) \\\"A\\\" becomes \\\"S\\\" and \\\"a\\\" becomes \\\"s\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\\\"PpLlMm\\\" becomes \\\"{[:;\u0026lt;,\\\"\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\u003eAn encoded message will never have any \\\"QqAaZz\\\" letters.\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\u003eIllegal characters in the original message are \\\"{{:;\u0026lt;,\\\".\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\u003eEncode \\\"A-Za-z\\\". All other characters are normal except for the Illegal characters.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\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\u003estr= \\\"You miss\\\"\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\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\u003eencoded_str= \\\"Upi ,odd\\\"\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\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":44302,"title":"Check if inputted variable is a string or a number","description":"Check if a inputted variable is a number or a string, given a string input (i.e. '1' is 1 and thus a number, 'a' is a string).","description_html":"\u003cp\u003eCheck if a inputted variable is a number or a string, given a string input (i.e. '1' is 1 and thus a number, 'a' is a string).\u003c/p\u003e","function_template":"function y = your_fcn_name(x)\r\n  y = ...;\r\nend","test_suite":"%%\r\nx = '1';\r\ny_correct = 1;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n\r\n%%\r\nx = 1;\r\ny_correct = 0;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n\r\n%%\r\nx = '42';\r\ny_correct = 1;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n\r\n%%\r\nx = 42;\r\ny_correct = 0;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n\r\n%%\r\nx = 'i';\r\ny_correct = 1;\r\nassert(isequal(your_fcn_name(x),y_correct))\r\n\r\n%%\r\nx = i;\r\ny_correct = 0;\r\nassert(isequal(your_fcn_name(x),y_correct))","published":true,"deleted":false,"likes_count":0,"comments_count":1,"created_by":12852,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":92,"test_suite_updated_at":"2017-09-08T19:45:32.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2017-09-06T01:19:10.000Z","updated_at":"2026-03-09T20:44:38.000Z","published_at":"2017-09-06T01:19:10.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eCheck if a inputted variable is a number or a string, given a string input (i.e. '1' is 1 and thus a number, 'a' is a string).\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":1731,"title":"Text File Read: 64 bit data set","description":"This Challenge is to read a text file that has vary large integers up to 2e18, typical for Google Code Jam. These values are well within the bounds of uint64.\r\nThe data is an array of Q pairs.\r\nInput: [Q, fname] The number of lines in the file and its filename.\r\nOutput: M a uint64 matrix of size(Q,2)\r\nExample:\r\nInput: {4, 'Cody_64.txt']\r\nThe text file:\r\n308436464205151562 1850618785230909388\r\n373665302816212423 1494661211264849698\r\n760961177192651897 1521922354385303795\r\n1 2000000000000000000\r\n\r\nOuput: A uint64 (4,2) matrix to full precision.\r\nNote of Warning:\r\nThe fscanf function with %ul may not succeed, as of 7/20/2013.\r\nThe result window has a case showing the function output\r\nRelated Challenges:\r\n1) Bullseye Large Numbers r\u003c1E18, P\u003c2E18\r\n2) Super Large Numbers \u003e2^64  (Java BigInteger methods)","description_html":"\u003cdiv style = \"text-align: start; line-height: 20px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: normal; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"display: block; min-width: 0px; padding-top: 0px; vertical-align: baseline; \"\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003eThis Challenge is to read a text file that has vary large integers up to 2e18, typical for\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eGoogle Code Jam\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003e. These values are well within the bounds of uint64.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003eThe data is an array of Q pairs.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"font-weight: bold; \"\u003eInput:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003e [Q, fname] The number of lines in the file and its filename.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"font-weight: bold; \"\u003eOutput:\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003e M a uint64 matrix of size(Q,2)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"font-weight: bold; \"\u003eExample:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-bottom: 10px; margin-left: 3px; margin-right: 3px; margin-top: 10px; 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-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003eInput: {4, \u003c/span\u003e\u003cspan style=\"border-block-end: 0px none rgb(170, 4, 249); border-block-start: 0px none rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end: 0px none rgb(170, 4, 249); border-inline-start: 0px none 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-right: 0px; outline-color: rgb(170, 4, 249); text-decoration-color: rgb(170, 4, 249); \"\u003e'Cody_64.txt'\u003c/span\u003e\u003cspan style=\"margin-right: 0px; \"\u003e]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003eThe \u003c/span\u003e\u003cspan style=\"border-block-end: 0px none rgb(170, 4, 249); border-block-start: 0px none rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end: 0px none rgb(170, 4, 249); border-inline-start: 0px none 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-right: 0px; outline-color: rgb(170, 4, 249); text-decoration-color: rgb(170, 4, 249); \"\u003etext file:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003e308436464205151562 1850618785230909388\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003e373665302816212423 1494661211264849698\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003e760961177192651897 1521922354385303795\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003e1 2000000000000000000\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003eOuput: A uint64 (4,2) matrix \u003c/span\u003e\u003cspan style=\"border-block-end: 0px none rgb(170, 4, 249); border-block-start: 0px none rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end: 0px none rgb(170, 4, 249); border-inline-start: 0px none 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-right: 0px; outline-color: rgb(170, 4, 249); text-decoration-color: rgb(170, 4, 249); \"\u003eto full precision.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 10px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"font-weight: bold; \"\u003eNote of Warning:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003eThe fscanf function with %ul may not succeed, as of 7/20/2013.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003eThe result window has a case showing the function output\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"font-weight: bold; \"\u003eRelated Challenges:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-bottom: 10px; margin-left: 3px; margin-right: 3px; margin-top: 10px; 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-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003e1) Bullseye \u003c/span\u003e\u003cspan style=\"border-block-end: 0px none rgb(170, 4, 249); border-block-start: 0px none rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end: 0px none rgb(170, 4, 249); border-inline-start: 0px none 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-right: 0px; outline-color: rgb(170, 4, 249); text-decoration-color: rgb(170, 4, 249); \"\u003eLarge Numbers r\u0026lt;1E18\u003c/span\u003e\u003cspan style=\"margin-right: 0px; \"\u003e, P\u0026lt;2E18\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end: 1px solid rgb(233, 233, 233); border-inline-start: 1px solid rgb(233, 233, 233); 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-top-left-radius: 0px; border-top-right-radius: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 18px; padding-left: 4px; white-space: nowrap; \"\u003e\u003cspan style=\"border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); 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-right: 45px; min-height: 0px; padding-left: 0px; tab-size: 4; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-right: 0px; \"\u003e2) Super \u003c/span\u003e\u003cspan style=\"border-block-end: 0px none rgb(170, 4, 249); border-block-start: 0px none rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end: 0px none rgb(170, 4, 249); border-inline-start: 0px none 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-right: 0px; outline-color: rgb(170, 4, 249); text-decoration-color: rgb(170, 4, 249); \"\u003eLarge Numbers \u0026gt;2^64\u003c/span\u003e\u003cspan style=\"margin-right: 0px; \"\u003e  \u003c/span\u003e\u003cspan style=\"border-block-end: 0px none rgb(170, 4, 249); border-block-start: 0px none rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end: 0px none rgb(170, 4, 249); border-inline-start: 0px none 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-right: 0px; outline-color: rgb(170, 4, 249); text-decoration-color: rgb(170, 4, 249); \"\u003e(Java BigInteger methods)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function [m]=read_input64(Q,fn)\r\n m=zeros(Q,2,'uint64');\r\nend","test_suite":"%%\r\nfid=fopen('Cody_64.txt','w');\r\n fprintf(fid,'%s\\n','308436464205151562 1850618785230909388');\r\n fprintf(fid,'%s\\n','760961177192651897 1521922354385303795');\r\n fprintf(fid,'%s\\n','23875933057623902 1098292920650700527');\r\n fprintf(fid,'%s\\n','1000 2000000000000000000');\r\nfclose(fid);\r\n%%\r\n% This section has no assert to show the values being returned\r\nQ=4;\r\nfn='Cody_64.txt';\r\nm=read_input64(Q,fn)\r\n%%\r\nQ=4;\r\nfn='Cody_64.txt';\r\nm=read_input64(Q,fn)\r\nm_exp=[uint64(308436464205151562) uint64(1850618785230909388);uint64(760961177192651897) uint64(1521922354385303795);uint64(23875933057623902) uint64(1098292920650700527);1000 2000000000000000000];\r\nassert(isequal(m,m_exp));\r\n%%\r\nQ=4;\r\nm_exp=randi(2^31,Q,2);\r\nfn='Cody_64a.txt';\r\nfid=fopen(fn,'w');\r\nfor i=1:Q\r\n fprintf(fid,'%s %s\\n',num2str(m_exp(i,1)),num2str(m_exp(i,2)));\r\nend\r\nfclose(fid);\r\nm=read_input64(Q,fn);\r\nassert(isequal(m,m_exp))\r\n%%\r\nQ=8;\r\nm_exp=randi(2^31,Q,2)*2^19;\r\nfn='Cody_64.txt';\r\nfid=fopen(fn,'w');\r\nfor i=1:Q\r\n fprintf(fid,'%s %s\\n',num2str(m_exp(i,1)),num2str(m_exp(i,2)));\r\nend\r\nfclose(fid);\r\nm=read_input64(Q,fn);\r\nassert(isequal(m,m_exp))\r\n\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":4,"created_by":3097,"edited_by":26769,"edited_at":"2022-04-12T15:26:08.000Z","deleted_by":null,"deleted_at":null,"solvers_count":13,"test_suite_updated_at":"2022-04-12T15:26:08.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-07-21T01:54:32.000Z","updated_at":"2022-04-12T15:26:08.000Z","published_at":"2013-07-21T02:56:48.000Z","restored_at":null,"restored_by":null,"spam":null,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThis Challenge is to read a text file that has vary large integers up to 2e18, typical for\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eGoogle Code Jam\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. These values are well within the bounds of uint64.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe data is an array of Q pairs.\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e [Q, fname] The number of lines in the file and its filename.\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e M a uint64 matrix of size(Q,2)\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[Input: {4, 'Cody_64.txt']\\nThe text file:\\n308436464205151562 1850618785230909388\\n373665302816212423 1494661211264849698\\n760961177192651897 1521922354385303795\\n1 2000000000000000000\\n\\nOuput: A uint64 (4,2) matrix to full precision.]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eNote of Warning:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe fscanf function with %ul may not succeed, as of 7/20/2013.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe result window has a case showing the function output\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eRelated Challenges:\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[1) Bullseye Large Numbers r\u003c1E18, P\u003c2E18\\n2) Super Large Numbers \u003e2^64  (Java BigInteger methods)]]\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":1532,"title":"SLP Calculation","description":"The SLP Calculation Challenge is to implement SLP sequences and output the result as a string. SLP, Straight Line Program, creates a value based upon two pointers of prior values and one of the operators [ + - * ]. The first value in the sequence is 1 and is assigned pointer 0 (zero based indexing).\r\n\r\n*Input:* SLP_sequence (string)\r\n\r\n*Output:* SLP_value (string)\r\n\r\n*Example:*\r\n\r\n*Input:*\r\nSLP_sequence='0+0,1+1,2*2,3+1,3*4,5-3,6+0,5*1,5*7,9+8,9*10';\r\n\r\nProduces:( Index 0 is 1 )\r\n\r\n2, 4, 16, 18, 288, 272, 273, 576, 78624, 79200, 6227020800\r\n\r\n*Output:*\r\n'6227020800' \r\n\r\nThe complexity to this Challenge is some solutions will exceed 2^64 and have eps\u003e1.\r\n\r\nPrior to viewing the link: What number is 2568 digits long and has 249 trailing zeros?\r\n\r\n\u003chttp://www.azspcs.net/ Al's Contests\u003e\r\n\r\n\r\n\r\n\r\n ","description_html":"\u003cp\u003eThe SLP Calculation Challenge is to implement SLP sequences and output the result as a string. SLP, Straight Line Program, creates a value based upon two pointers of prior values and one of the operators [ + - * ]. The first value in the sequence is 1 and is assigned pointer 0 (zero based indexing).\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e SLP_sequence (string)\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e SLP_value (string)\u003c/p\u003e\u003cp\u003e\u003cb\u003eExample:\u003c/b\u003e\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e\r\nSLP_sequence='0+0,1+1,2*2,3+1,3*4,5-3,6+0,5*1,5*7,9+8,9*10';\u003c/p\u003e\u003cp\u003eProduces:( Index 0 is 1 )\u003c/p\u003e\u003cp\u003e2, 4, 16, 18, 288, 272, 273, 576, 78624, 79200, 6227020800\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e\r\n'6227020800'\u003c/p\u003e\u003cp\u003eThe complexity to this Challenge is some solutions will exceed 2^64 and have eps\u003e1.\u003c/p\u003e\u003cp\u003ePrior to viewing the link: What number is 2568 digits long and has 249 trailing zeros?\u003c/p\u003e\u003cp\u003e\u003ca href = \"http://www.azspcs.net/\"\u003eAl's Contests\u003c/a\u003e\u003c/p\u003e","function_template":"function SLP = SLP_calc(SLP_str)\r\n  SLP = '0';\r\nend","test_suite":"SLP_str='0+0,1+1,2*2,3+1,3*4,5-3,6+0,5*1,5*7,9+8,9*10';\r\n\r\nSLP = SLP_calc(SLP_str);\r\nSLP_exp='6227020800';\r\n\r\nassert(strcmp(SLP,SLP_exp),sprintf('%s\\n',SLP));\r\n%%\r\nSLP_str='0+0,1*1,1+2,3*3,3*4,5-3,6-4,2+5,8+2,5*6,8*9,7*11,8*10,13+10,8+14,2*13,12*15,14*16,17*18,18*19';\r\n\r\nSLP = SLP_calc(SLP_str);\r\nSLP_exp='13763753091226345046315979581580902400000000';\r\n\r\nassert(strcmp(SLP,SLP_exp),sprintf('%s\\n',SLP));\r\n%%\r\nSLP_str='0+0, 1+1, 2*2, 3-1, 3+4, 5+1, 5+4, 7+3, 8+6, 9+2, 4*4, 11+5, 8*4, 13+0, 14-12, 15+5, 8*5, 17-3, 10*9, 13*10, 15*15, 21-2, 22-19, 23-4, 21+16, 25+3, 16*16, 27-11, 28-2, 27-7, 30+2, 29+11, 32-19, 13*13, 34-2, 35-19, 27+29, 17*17, 38-2, 39-19, 39-10, 41-7, 38+2, 20*7, 44-27, 44+11, 44+35, 20*10, 48-47, 48+30, 50-40, 51-3, 50+27, 44*2, 54-35, 55-37, 55-13, 57-48, 55+9, 59-35, 60+11, 61-44, 62-53, 61+15, 60+13, 59+19, 66-62, 67-21, 52-68, 68+5, 54-24, 71-46, 59+24, 73+19, 74-26, 61+45, 66+61, 77-41, 78-63, 77-22, 80+28, 80+50, 82-13, 83+35, 84-60, 85-64, 81-86, 85+43, 88+39, 77+64, 35*36, 91+54, 92-44, 92+37, 93*91, 95*92, 93+48, 96*97, 39*40, 99-93, 99+54, 101-44, 102*99, 103*101, 102+48, 104*105, 22*23, 106*107, 107+54, 109-44, 108*110, 111*109, 110+48, 113-1, 112*113, 32*33, 115*116, 116+54, 118-114, 118-44, 117*120, 121*118, 120+48, 122*123, 124*94, 125*119, 126*30, 127*28, 98*46, 128*100, 57*31, 131*56, 130*60, 132*58, 129*61, 133*64, 134*62, 53*41, 136*51, 137*63, 135*52, 138*24, 139*71, 141*73, 144*72, 143*67, 146*68, 65*70, 147*80, 78*59, 145*90, 140*82, 142*83, 149*84, 86*37, 154*88, 148*89, 153*25, 151*26, 156*76, 75*42, 160*49, 162*87, 152*69, 163*79, 157*18, 81-52, 167+6, 164*15, 165*5, 30-15, 171-3, 150*172, 43+31, 66+59, 175+14, 176*174, 30-25, 166*178, 35-23, 180-17, 181*20, 82-33, 183*12, 60-30, 184*185, 71-40, 187*39, 188*7, 33-18, 44*190, 186*182, 192*168, 179*182, 193*177, 194*155, 169*168, 196*161, 195*173, 197*155, 198*158, 159*177, 202*161, 203*200, 170*173, 205*158, 206*200, 191*34, 208*208, 209*189, 210*210, 211*199, 212*212, 213*201, 214*214, 215*204, 216*216, 217*207';\r\n\r\ntic\r\nSLP = SLP_calc(SLP_str);\r\ntoc\r\nSLP_exp='402387260077093773543702433923003985719374864210714632543799910429938512398629020592044208486969404800479988610197196058631666872994808558901323829669944590997424504087073759918823627727188732519779505950995276120874975462497043601418278094646496291056393887437886487337119181045825783647849977012476632889835955735432513185323958463075557409114262417474349347553428646576611667797396668820291207379143853719588249808126867838374559731746136085379534524221586593201928090878297308431392844403281231558611036976801357304216168747609675871348312025478589320767169132448426236131412508780208000261683151027341827977704784635868170164365024153691398281264810213092761244896359928705114964975419909342221566832572080821333186116811553615836546984046708975602900950537616475847728421889679646244945160765353408198901385442487984959953319101723355556602139450399736280750137837615307127761926849034352625200015888535147331611702103968175921510907788019393178114194545257223865541461062892187960223838971476088506276862967146674697562911234082439208160153780889893964518263243671616762179168909779911903754031274622289988005195444414282012187361745992642956581746628302955570299024324153181617210465832036786906117260158783520751516284225540265170483304226143974286933061690897968482590125458327168226458066526769958652682272807075781391858178889652208164348344825993266043367660176999612831860788386150279465955131156552036093988180612138558600301435694527224206344631797460594682573103790084024432438465657245014402821885252470935190620929023136493273497565513958720559654228749774011413346962715422845862377387538230483865688976461927383814900140767310446640259899490222221765904339901886018566526485061799702356193897017860040811889729918311021171229845901641921068884387121855646124960798722908519296819372388642614839657382291123125024186649353143970137428531926649875337218940694281434118520158014123344828015051399694290153483077644569099073152433278288269864602789864321139083506217095002597389863554277196742822248757586765752344220207573630569498825087968928162753848863396909959826280956121450994871701244516461260379029309120889086942028510640182154399457156805941872748998094254742173582401063677404595741785160829230135358081840096996372524230560855903700624271243416909004153690105933983835777939410970027753472000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000';\r\n\r\n\r\nassert(strcmp(SLP,SLP_exp),sprintf('%s\\n',SLP));\r\n\r\n\r\n\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":7,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2013-06-01T21:37:49.000Z","updated_at":"2013-06-01T22:56:28.000Z","published_at":"2013-06-01T22:56:28.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe SLP Calculation Challenge is to implement SLP sequences and output the result as a string. SLP, Straight Line Program, creates a value based upon two pointers of prior values and one of the operators [ + - * ]. The first value in the sequence is 1 and is assigned pointer 0 (zero based indexing).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e SLP_sequence (string)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e SLP_value (string)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExample:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e SLP_sequence='0+0,1+1,2*2,3+1,3*4,5-3,6+0,5*1,5*7,9+8,9*10';\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\u003eProduces:( Index 0 is 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\u003e2, 4, 16, 18, 288, 272, 273, 576, 78624, 79200, 6227020800\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e '6227020800'\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe complexity to this Challenge is some solutions will exceed 2^64 and have eps\u0026gt;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\u003ePrior to viewing the link: What number is 2568 digits long and has 249 trailing zeros?\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:hyperlink w:docLocation=\\\"http://www.azspcs.net/\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eAl's Contests\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":724,"title":"QWERTY Shift Code Decoder","description":"Decode a string encoded using the QWERTY shift code.\r\n\r\nQWERTY shift code is where the message was touch typed but with an offset of one character to the right.\r\n\r\nOnly letters are encoded as the top row does not incur shifting.\r\n\r\n(eg) \"A\" became \"S\" and \"a\" became \"s\"\r\n\r\n\"PpLlMm\" became \"{[:;\u003c,\"\r\n\r\nAn encoded message never contains any \"QqAaZz\" letters.\r\n\r\nIllegal characters in the original message were \"{[:;\u003c,\".\r\n\r\nDecode \"A-Za-z\".\r\nAll other characters are normal except for the Illegal characters.\r\n\r\n*Input:*\r\n\r\nencoded_str= \"Upi ,odd\"\r\n\r\n\r\n*Output:*\r\n\r\ndecoded_str= \"You miss\"\r\n\r\n\r\n","description_html":"\u003cp\u003eDecode a string encoded using the QWERTY shift code.\u003c/p\u003e\u003cp\u003eQWERTY shift code is where the message was touch typed but with an offset of one character to the right.\u003c/p\u003e\u003cp\u003eOnly letters are encoded as the top row does not incur shifting.\u003c/p\u003e\u003cp\u003e(eg) \"A\" became \"S\" and \"a\" became \"s\"\u003c/p\u003e\u003cp\u003e\"PpLlMm\" became \"{[:;\u0026lt;,\"\u003c/p\u003e\u003cp\u003eAn encoded message never contains any \"QqAaZz\" letters.\u003c/p\u003e\u003cp\u003eIllegal characters in the original message were \"{[:;\u0026lt;,\".\u003c/p\u003e\u003cp\u003eDecode \"A-Za-z\".\r\nAll other characters are normal except for the Illegal characters.\u003c/p\u003e\u003cp\u003e\u003cb\u003eInput:\u003c/b\u003e\u003c/p\u003e\u003cp\u003eencoded_str= \"Upi ,odd\"\u003c/p\u003e\u003cp\u003e\u003cb\u003eOutput:\u003c/b\u003e\u003c/p\u003e\u003cp\u003edecoded_str= \"You miss\"\u003c/p\u003e","function_template":"function decoded_str = Qwerty_decode(str)\r\n  decoded_str=str;\r\nend","test_suite":"%%\r\ns='ThE qUiCk BrOwN fOx JuMpEd OvEr ThE lAzY dOg';\r\nse = 'YjR wIoVl NtPeM gPc Ki\u003c[Rf PbRt YjR ;SxU fPh';\r\nassert(isequal(Qwerty_decode(se),s))\r\n%%\r\ns='abcdefghijklmnopqrstuvwxyz';\r\nse='snvfrghjokl;,mp[wtdyibecux'; % a-z\r\nassert(isequal(Qwerty_decode(se),s))\r\n%%\r\ns='ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\nse='SNVFRGHJOKL:\u003cMP{WTDYIBECUX'; % A-Z\r\nassert(isequal(Qwerty_decode(se),s))\r\n%%\r\ns='You miss 100 percent of the shots you never take. Gretzky';\r\nse='Upi ,odd 100 [rtvrmy pg yjr djpyd upi mrbrt yslr. Htryxlu';\r\nassert(isequal(Qwerty_decode(se),s))\r\n%%\r\ns='Those who believe in telekinetics raise my hand. Vonnegut';\r\nse='Yjpdr ejp nr;orbr om yr;rlomryovd tsodr ,u jsmf. Bpmmrhiy';\r\nassert(isequal(Qwerty_decode(se),s))","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":230,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":14,"created_at":"2012-05-27T19:05:49.000Z","updated_at":"2026-03-30T18:09:29.000Z","published_at":"2012-05-27T19:08:04.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\u003eDecode a string encoded using the QWERTY shift code.\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\u003eQWERTY shift code is where the message was touch typed but with an offset of one character to the right.\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\u003eOnly letters are encoded as the top row does not incur shifting.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e(eg) \\\"A\\\" became \\\"S\\\" and \\\"a\\\" became \\\"s\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\\\"PpLlMm\\\" became \\\"{[:;\u0026lt;,\\\"\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\u003eAn encoded message never contains any \\\"QqAaZz\\\" letters.\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\u003eIllegal characters in the original message were \\\"{[:;\u0026lt;,\\\".\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\u003eDecode \\\"A-Za-z\\\". All other characters are normal except for the Illegal characters.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\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\u003eencoded_str= \\\"Upi ,odd\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\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\u003edecoded_str= \\\"You miss\\\"\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":723,"title":"QWERTY Shift Encoder","description":"Encode a string using the QWERTY shift code.\r\nThis code is where you touch type but are offset by one character to the right.\r\nOnly letters are encoded as the top row shifting does not occur.\r\n(eg) \"A\" becomes \"S\" and \"a\" becomes \"s\"\r\n\"PpLlMm\" becomes \"{[:;\u003c,\"\r\nAn encoded message will never have any \"QqAaZz\" letters.\r\nIllegal characters in the original message are \"{{:;\u003c,\".\r\nEncode \"A-Za-z\". All other characters are normal except for the Illegal characters.\r\nInput:\r\nstr= \"You miss\"\r\nOutput:\r\nencoded_str= \"Upi ,odd\"","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: 351px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 175.5px; transform-origin: 407px 175.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 147.5px 8px; transform-origin: 147.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eEncode a string using the QWERTY shift code.\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: 245px 8px; transform-origin: 245px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThis code is where you touch type but are offset by one character to the right.\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: 199.5px 8px; transform-origin: 199.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eOnly letters are encoded as the top row shifting does not occur.\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: 132.5px 8px; transform-origin: 132.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e(eg) \"A\" becomes \"S\" and \"a\" becomes \"s\"\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: 82px 8px; transform-origin: 82px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\"PpLlMm\" becomes \"{[:;\u0026lt;,\"\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: 186px 8px; transform-origin: 186px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eAn encoded message will never have any \"QqAaZz\" letters.\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: 165px 8px; transform-origin: 165px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eIllegal characters in the original message are \"{{:;\u0026lt;,\".\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: 255.5px 8px; transform-origin: 255.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eEncode \"A-Za-z\". All other characters are normal except for the Illegal characters.\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: 20px 8px; transform-origin: 20px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eInput:\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: 47px 8px; transform-origin: 47px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003estr= \"You miss\"\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: 26px 8px; transform-origin: 26px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eOutput:\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: 76.5px 8px; transform-origin: 76.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eencoded_str= \"Upi ,odd\"\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function encoded_str = Qwerty_encode(str)\r\n  encoded_str=str;\r\nend","test_suite":"%%\r\ns='ThE qUiCk BrOwN fOx JuMpEd OvEr ThE lAzY dOg';\r\nse = 'YjR wIoVl NtPeM gPc Ki\u003c[Rf PbRt YjR ;SxU fPh';\r\nassert(isequal(Qwerty_encode(s),se))\r\n%%\r\ns='abcdefghijklmnopqrstuvwxyz';\r\nse='snvfrghjokl;,mp[wtdyibecux'; % a-z\r\nassert(isequal(Qwerty_encode(s),se))\r\n%%\r\ns='ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\nse='SNVFRGHJOKL:\u003cMP{WTDYIBECUX'; % A-Z\r\nassert(isequal(Qwerty_encode(s),se))\r\n%%\r\ns='You miss 100 percent of the shots you never take. Gretzky';\r\nse='Upi ,odd 100 [rtvrmy pg yjr djpyd upi mrbrt yslr. Htryxlu';\r\nassert(isequal(Qwerty_encode(s),se))\r\n%%\r\ns='Those who believe in telekinetics raise my hand. Vonnegut';\r\nse='Yjpdr ejp nr;orbr om yr;rlomryovd tsodr ,u jsmf. Bpmmrhiy';\r\nassert(isequal(Qwerty_encode(s),se))\r\n%%\r\ns='';\r\nse='';\r\nassert(isequal(Qwerty_encode(s),se))\r\n%%\r\nstr='qwerty';\r\nidx=randi(5)\r\ns=str(idx);\r\nse=str(idx+1);\r\nassert(isequal(Qwerty_encode(s),se))\r\n\r\n","published":true,"deleted":false,"likes_count":5,"comments_count":0,"created_by":3097,"edited_by":223089,"edited_at":"2023-01-27T15:14:11.000Z","deleted_by":null,"deleted_at":null,"solvers_count":250,"test_suite_updated_at":"2023-01-27T15:14:11.000Z","rescore_all_solutions":false,"group_id":14,"created_at":"2012-05-26T07:24:15.000Z","updated_at":"2026-03-13T21:49:17.000Z","published_at":"2012-05-27T18:56:31.000Z","restored_at":null,"restored_by":null,"spam":null,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEncode a string using the QWERTY shift code.\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\u003eThis code is where you touch type but are offset by one character to the right.\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\u003eOnly letters are encoded as the top row shifting does not occur.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e(eg) \\\"A\\\" becomes \\\"S\\\" and \\\"a\\\" becomes \\\"s\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\\\"PpLlMm\\\" becomes \\\"{[:;\u0026lt;,\\\"\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\u003eAn encoded message will never have any \\\"QqAaZz\\\" letters.\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\u003eIllegal characters in the original message are \\\"{{:;\u0026lt;,\\\".\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\u003eEncode \\\"A-Za-z\\\". All other characters are normal except for the Illegal characters.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eInput:\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\u003estr= \\\"You miss\\\"\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eOutput:\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\u003eencoded_str= \\\"Upi ,odd\\\"\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\"}]}"}],"term":"tag:\"str2num\"","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:\"str2num\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"str2num\"","","\"","str2num","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f4a01380980\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f4a013808e0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f4a01380020\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f4a01380c00\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f4a01380b60\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f4a01380ac0\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f4a01380a20\u003e":"tag:\"str2num\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f4a01380a20\u003e":"tag:\"str2num\""},"queried_facets":{}},"query_backend":{"connection":{"configuration":{"index_url":"http://index-op-v2/solr/","query_url":"http://search-op-v2/solr/","direct_access_index_urls":["http://index-op-v2/solr/"],"direct_access_query_urls":["http://search-op-v2/solr/"],"timeout":10,"vhost":"search","exchange":"search.topic","heartbeat":30,"pre_index_mode":false,"host":"rabbitmq-eks","port":5672,"username":"search","password":"J3bGPZzQ7asjJcCk","virtual_host":"search","indexer":"amqp","http_logging":"true","core":"cody"},"query_connection":{"uri":"http://search-op-v2/solr/cody/","proxy":null,"connection":{"parallel_manager":null,"headers":{"User-Agent":"Faraday v1.0.1"},"params":{},"options":{"params_encoder":"Faraday::FlatParamsEncoder","proxy":null,"bind":null,"timeout":null,"open_timeout":null,"read_timeout":null,"write_timeout":null,"boundary":null,"oauth":null,"context":null,"on_data":null},"ssl":{"verify":true,"ca_file":null,"ca_path":null,"verify_mode":null,"cert_store":null,"client_cert":null,"client_key":null,"certificate":null,"private_key":null,"verify_depth":null,"version":null,"min_version":null,"max_version":null},"default_parallel_manager":null,"builder":{"adapter":{"name":"Faraday::Adapter::NetHttp","args":[],"block":null},"handlers":[{"name":"Faraday::Response::RaiseError","args":[],"block":null}],"app":{"app":{"ssl_cert_store":{"verify_callback":null,"error":null,"error_string":null,"chain":null,"time":null},"app":{},"connection_options":{},"config_block":null}}},"url_prefix":"http://search-op-v2/solr/cody/","manual_proxy":false,"proxy":null},"update_format":"RSolr::JSON::Generator","update_path":"update","options":{"url":"http://search-op-v2/solr/cody"}}},"query":{"params":{"per_page":50,"term":"tag:\"str2num\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"str2num\"","","\"","str2num","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f4a01380980\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f4a013808e0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f4a01380020\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f4a01380c00\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f4a01380b60\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f4a01380ac0\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f4a01380a20\u003e":"tag:\"str2num\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f4a01380a20\u003e":"tag:\"str2num\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":44302,"difficulty_rating":"easy"},{"id":1731,"difficulty_rating":"easy-medium"},{"id":1532,"difficulty_rating":"easy-medium"},{"id":724,"difficulty_rating":"easy-medium"},{"id":723,"difficulty_rating":"medium"}]}}