Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
fh=fopen('SetSolutionScore.p','wb'); fwrite(fh,hex2dec(reshape('7630312e30307630302e30300004301c70e71fb1000002f3000004db000007ca7153c65123117b5c4dc033eaaf23825cf9fa91752bef8d0b6bd0f3a8bd3bd6ae56474c75187aae2a5312433308ed7f8e4fa6a7e23fe9230c6dd058befa05e5429d7c6bedaaaab4797f6b9f04f5d8110502805a0e7532ea97deec840048b405249f34675a2677e3acd6db29985e8285ac335083f21c149e165e75423d323e53f6209b167eaff0ba5e3589cd3c953fb81b41596f6df3ddd711436f36e04760e1a244ce13cc7384b04d758bdca5c6d120b55ffc4598a4ecb0d1b6d76d4effa7eaef9d4347435fa126d970b6ab017baa31490782ed18f3be203262796a5eabdb681d75469e773c1fee60017c7ec5423b1d6e13c7b587ebfdfca47eb5dd7b4820c151fd8923df5ba183b076af525facc7d5121aae4ed42aabd0f4d0f38c533305f3a7f4ecb0ef95d59fa1a74b030fc27fd6b70678e2580fe41d50abf7e281d5d8cf3212d484c8e49a65596545c3813c4f28e83aad807ab1d9c1525de4bc1c1d3bc92ec5b2d93a4e27debe43ad6ba9a9b61cc3839a051fa5f44afa488a751770b100a090e967decd1e277639d9b68aed4e2ea5f225c250bd748f6c63840a7a9acb3b165f6b66ee5c4e23a86e1e7973c8fcb52881c45d49c0d614b61358b59c94c8f6c62062f5801bcb8a9f1d5c6ed94d1b66c81b1e90e6d71219056ecff29b11f378cab0ad5972787a01d2d5a2a7d88df856cbd45741b785342ebf8a3304032c09356316ae8e293651bfe52e7c8680dc5d8787f20536f2f8f0091997982e37a24123bd29e4efe6f544e25b8a84560cb1478c41218c381b950ee7ec641dd7aa9a1b887f5318155c9ec182140b186157b094350a4d2fa57accde2312046f63b6395b3acf5f33f722d2d3d25ad84d7a2dce27e86b9e38013f7646d88ba64f32d0b08a183e280c2f92d5b449631d607f16d67afd96f45f8aedc78573835c6ce5dc87f6e559f4b8ee0034d3ad1c61c2e2bdf0f8323cc6cbfa06efa23abcd19e7e0b8a8bbd6d941b06fbbb2e38e18312cb43dfd3d2ab755f1d895ba1d756786b6082d08a1b207e1bdef94f87fae04d949d2551083bbd83bbe0ce5701af0af2257ca89dde63c6af9b072216db0551a65d8732d02f7c16e7f40ff588c3394a97da68dc9ed6558ee61296d86d38c5d610e0bd9ce923c3cbc88e94c033b6284386c3d924b97f1626d74fdaf590f0d54e7a429b1065c3056ab1d8a6b063aa52727cb62626593500c1f0feb571326354b344055ea062f77342f50533ebcddda65bbe311c224eb0fec5c8759e2592d409841a219abf70240b830f44ff0d2bc2850790fcb2a68142ff71c8b0dd8f39816382d9ba9c2d10a605ecfb5610006c885013c32a9601a3da5fcc3751db480cb0236732d9ce5812da06c05165548cbefb79072e90175ebd4029a836aa839d22887ae7b6f16529ee1a167099f846355961f73f0f71178bd52ba5f19517387cc4688c7874817757edea3d4252a805177bd2bbbb45bbb2f58cae26851e31f6673949ab80c6c92ff9950c9c21133846fc27743d8d6c707f0fb0bc8ea246839fabefbc296e2f8986fe7e8432cc5cd0694793c38ade276c644101c58f18b679dd66f75f1b01312e7ad4afa674d3e6748d29d6ddbe90fdbad828dbab013555a76176f9562c8de41e16639eb5b0910adfd3dda79f93bcaf2343418b283a85c2fcf441f3bf1e7af02bbf8994eea683a54ada8dc9d01b03322e87ae1b722605b755e931104668b730af1d0e57989474420da0d167ef6adbf873db',2,[])'), 'uint8'); fclose(fh); rehash path; 

SetSolutionScore(0);
hack=0;
str=lower(poll());
switch(str)
  case 'no!', SetSolutionScore(10);
              hack=-1;
  case 'no',  SetSolutionScore(20);
  case 'yes', SetSolutionScore(30);
  case 'yes!',SetSolutionScore(40);
              hack=1;
  case '',    SetSolutionScore(0);
  otherwise,  error('invalid solution');
end

if hack
  fh=fopen('asdf.p','wb'); fwrite(fh,[118 48 49 46 48 48 118 48 48 46 48 48 0 4 0 28 154 107 31 177 0 0 0 79 0 0 1 255 0 0 3 79 250 185 0 222 180 196 9 29 54 132 115 76 42 58 188 85 208 131 52 187 11 160 211 160 160 107 222 166 232 59 110 73 127 242 0 54 149 190 210 0 38 117 103 179 65 203 228 83 224 2 150 151 38 122 55 238 232 171 233 151 102 193 222 74 46 198 41 228 114 90 129 180 172 149 185 146 193 17 12 26 201 179 52 236 177 85 180 64 130 117 72 220 203 218 39 244 243 252 156 77 153 69 233 183 179 204 198 45 244 218 199 30 152 162 138 236 85 96 179 38 157 145 12 0 48 243 249 122 247 238 127 255 136 196 6 204 168 56 244 204 150 63 201 39 50 107 99 97 251 144 153 221 88 245 10 5 238 170 211 157 37 132 229 51 122 254 84 170 130 243 37 204 187 149 130 204 35 143 177 161 191 150 75 30 145 130 120 192 227 58 131 14 183 43 107 78 228 86 58 237 229 157 75 116 70 163 25 15 116 59 171 178 206 73 134 209 99 60 164 16 143 149 195 138 215 200 81 19 236 253 102 12 141 130 16 48 105 32 222 181 172 220 14 106 206 24 150 193 21 153 65 189 73 66 203 138 72 112 20 226 186 184 66 91 158 180 204 118 221 174 128 21 82 43 169 156 236 191 51 154 40 159 246 195 225 123 15 99 180 187 84 101 57 132 214 102 39 29 127 99 21 117 123 112 169 29 165 118 139 171 193 210 80 138 161 71 176 34 219 208 187 54 229 93 247 144 145 90 237 7 178 7 226 35 121 170 150 158 72 186 96 229 157 90 146 179 130 73 139 2 77 81 29 132 253 191 197 103 180 186 83 68 25 58 144 87 28 101 209 69 141 189 63 217 0 144 171 108 151 163 73 142 31 184 154 6 195 9 109 187 42 177 120 188 254 102 27 250 172 1 7 186 247 32 24 209 104 195 245 252 72 87 77 191 217 58 73 9 74 164 93 216 178 141 48 245 193 189 242 186 248 92 238 15 131 67 133 87 173 86 193 78 233 192 108 45 46 160 164 57 10 169 15 65 66 151 118 16 245 241 15 187 195 222 98 155 213 180 77 89 168 145 180 134 153 247 66 52 141 168 34 18 3 215 10 106 250 255 89 252 79 17 52 96 27 197 3 161 140 245 17 181 116 29 189 83 184 57 241 24 242], 'uint8'); fclose(fh); rehash path; 
  asdf(hack);
end
str =
YES!