Cody

Solution 1710934

Submitted on 21 Jan 2019 by Matthew Wilson
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
x1 = zeros(1,6000); x2 = zeros(1,6000); for ii = 1:6000 [x1(ii),x2(ii)] = rollDice(); end numCt = sum( bsxfun( @eq, x1, (1:6)' ), 2 ) + sum( bsxfun( @eq, x2, (1:6)' ), 2 ); assert(all(round(numCt/200) == 10) && sum(numCt) == 12000)

roll = 0.8773 0.2735 x1 = 1 x2 = 1 roll = 2.2087 0.2994 x1 = 3 x2 = 1 roll = 4.0014 2.4128 x1 = 5 x2 = 3 roll = 2.5811 1.4065 x1 = 3 x2 = 2 roll = 4.9072 3.8656 x1 = 5 x2 = 4 roll = 3.0752 3.2824 x1 = 4 x2 = 4 roll = 3.3263 1.9424 x1 = 4 x2 = 2 roll = 4.1424 0.3888 x1 = 5 x2 = 1 roll = 1.5872 5.4155 x1 = 2 x2 = 6 roll = 3.7551 1.6989 x1 = 4 x2 = 2 roll = 0.7776 1.9723 x1 = 1 x2 = 2 roll = 4.0930 3.3519 x1 = 5 x2 = 4 roll = 5.0910 5.0533 x1 = 6 x2 = 6 roll = 1.8588 0.9649 x1 = 2 x2 = 1 roll = 5.8483 4.6901 x1 = 6 x2 = 5 roll = 2.6037 1.8459 x1 = 3 x2 = 2 roll = 1.0620 5.3122 x1 = 2 x2 = 6 roll = 1.0051 4.8319 x1 = 2 x2 = 5 roll = 0.4856 1.1575 x1 = 1 x2 = 2 roll = 2.3308 3.4796 x1 = 3 x2 = 4 roll = 0.6321 5.4429 x1 = 1 x2 = 6 roll = 0.0653 1.8384 x1 = 1 x2 = 2 roll = 1.2274 1.9601 x1 = 2 x2 = 2 roll = 5.8327 1.2464 x1 = 6 x2 = 2 roll = 2.0316 0.9772 x1 = 3 x2 = 1 roll = 1.7687 5.8858 x1 = 2 x2 = 6 roll = 1.1048 2.7301 x1 = 2 x2 = 3 roll = 0.1974 5.2854 x1 = 1 x2 = 6 roll = 2.8082 3.6448 x1 = 3 x2 = 4 roll = 0.2424 0.2709 x1 = 1 x2 = 1 roll = 0.2762 4.0127 x1 = 1 x2 = 5 roll = 2.9136 4.1333 x1 = 3 x2 = 5 roll = 5.1852 4.0306 x1 = 6 x2 = 5 roll = 4.7412 4.7371 x1 = 5 x2 = 5 roll = 0.1957 3.9888 x1 = 1 x2 = 4 roll = 4.0496 4.4359 x1 = 5 x2 = 5 roll = 1.0254 5.3331 x1 = 2 x2 = 6 roll = 5.5521 0.0092 x1 = 6 x2 = 1 roll = 4.5962 1.5820 x1 = 5 x2 = 2 roll = 3.9364 2.9017 x1 = 4 x2 = 3 roll = 3.8679 2.3777 x1 = 4 x2 = 3 roll = 0.3078 2.5006 x1 = 1 x2 = 3 roll = 5.9418 2.9695 x1 = 6 x2 = 3 roll = 5.3656 5.5292 x1 = 6 x2 = 6 roll = 1.2770 0.7696 x1 = 2 x2 = 1 roll = 1.0775 2.2069 x1 = 2 x2 = 3 roll = 2.0610 0.4549 x1 = 3 x2 = 1 roll = 4.4002 0.8863 x1 = 5 x2 = 1 roll = 1.1886 5.6863 x1 = 2 x2 = 6 roll = 1.2522 4.3552 x1 = 2 x2 = 5 roll = 1.6229 3.0734 x1 = 2 x2 = 4 roll = 5.1238 2.6651 x1 = 6 x2 = 3 roll = 4.9429 3.3132 x1 = 5 x2 = 4 roll = 2.9860 0.6925 x1 = 3 x2 = 1 roll = 1.2254 5.7554 x1 = 2 x2 = 6 roll = 3.5983 2.2416 x1 = 4 x2 = 3 roll = 5.9501 1.7838 x1 = 6 x2 = 2 roll = 1.4479 1.6242 x1 = 2 x2 = 2 roll = 0.5290 0.2473 x1 = 1 x2 = 1 roll = 0.5380 5.6148 x1 = 1 x2 = 6 roll = 2.2369 2.2135 x1 = 3 x2 = 3 roll = 0.2134 5.2663 x1 = 1 x2 = 6 roll = 3.2858 4.2510 x1 = 4 x2 = 5 roll = 4.5954 3.5220 x1 = 5 x2 = 4 roll = 0.6712 3.3578 x1 = 1 x2 = 4 roll = 1.6902 1.8477 x1 = 2 x2 = 2 roll = 4.6620 2.3031 x1 = 5 x2 = 3 roll = 0.6927 2.9265 x1 = 1 x2 = 3 roll = 4.4018 3.2873 x1 = 5 x2 = 4 roll = 4.5391 1.1056 x1 = 5 x2 = 2 roll = 0.6582 4.0813 x1 = 1 x2 = 5 roll = 1.7214 5.6395 x1 = 2 x2 = 6 roll = 1.9240 4.6877 x1 = 2 x2 = 5 roll = 3.8782 3.7900 x1 = 4 x2 = 4 roll = 0.9821 1.2416 x1 = 1 x2 = 2 roll = 0.8119 1.7601 x1 = 1 x2 = 2 roll = 5.8295 1.5254 x1 = 6 x2 = 2 roll = 1.9149 4.1923 x1 = 2 x2 = 5 roll = 0.2569 0.8972 x1 = 1 x2 = 1 roll = 0.1989 4.1811 x1 = 1 x2 = 5 roll = 4.6039 4.8507 x1 = 5 x2 = 5 roll = 1.0187 3.2090 x1 = 2 x2 = 4 roll = 0.3682 1.0970 x1 = 1 x2 = 2 roll = 4.9072 5.1028 x1 = 5 x2 = 6 roll = 5.7057 2.3774 x1 = 6 x2 = 3 roll = 3.7371 4.9706 x1 = 4 x2 = 5 roll = 3.1060 5.6534 x1 = 4 x2 = 6 roll = 2.1163 4.8001 x1 = 3 x2 = 5 roll = 4.2489 3.4800 x1 = 5 x2 = 4 roll = 0.0824 5.7473 x1 = 1 x2 = 6 roll = 5.5119 3.8232 x1 = 6 x2 = 4 roll = 1.8582 1.3731 x1 = 2 x2 = 2 roll = 4.2292 3.7707 x1 = 5 x2 = 4 roll = 3.5751 4.4501 x1 = 4 x2 = 5 roll = 0.4744 5.6360 x1 = 1 x2 = 6 roll = 4.2080 2.3860 x1 = 5 x2 = 3 roll = 1.5240 3.6480 x1 = 2 x2 = 4 roll = 0.8254 2.7318 x1 = 1 x2 = 3 roll = 2.2917 4.8756 x1 = 3 x2 = 5 roll = 0.3304 3.7427 x1 = 1 x2 = 4 roll = 2.5855 2.0698 x1 = 3 x2 = 3 roll = 4.2930 0.4756 x1 = 5 x2 = 1 roll = 4.3819 5.9380 x1 = 5 x2 = 6 roll = 2.7444 0.1356 x1 = 3 x2 = 1 roll = 0.3821 5.7982 x1 = 1 x2 = 6 roll = 5.3120 3.5765 x1 = 6 x2 = 4 roll = 3.4391 2.5520 x1 = 4 x2 = 3 roll = 2.9612 4.8501 x1 = 3 x2 = 5 roll = 3.2848 0.5142 x1 = 4 x2 = 1 roll = 5.1556 5.7192 x1 = 6 x2 = 6 roll = 1.8673 5.9623 x1 = 2 x2 = 6 roll = 4.6419 1.5348 x1 = 5 x2 = 2 roll = 0.5545 3.2566 x1 = 1 x2 = 4 roll = 5.6894 4.5657 x1 = 6 x2 = 5 roll = 3.1583 1.6854 x1 = 4 x2 = 2 roll = 2.6395 1.9165 x1 = 3 x2 = 2 roll = 5.8648 1.9267 x1 = 6 x2 = 2 roll = 0.4958 5.5406 x1 = 1 x2 = 6 roll = 2.6186 5.7588 x1 = 3 x2 = 6 roll = 0.0123 5.7196 x1 = 1 x2 = 6 roll = 0.5154 2.7485 x1 = 1 x2 = 3 roll = 3.6736 0.7261 x1 = 4 x2 = 1 roll = 4.2041 0.6596 x1 = 5 x2 = 1 roll = 3.0436 4.4191 x1 = 4 x2 = 5 roll = 2.9803 3.8306 x1 = 3 x2 = 4 roll = 4.8788 1.0499 x1 = 5 x2 = 2 roll = 4.9393 4.5365 x1 = 5 x2 = 5 roll = 2.9607 0.8715 x1 = 3 x2 = 1 roll = 4.3319 2.9407 x1 = 5 x2 = 3 roll = 1.3578 1.0407 x1 = 2 x2 = 2 roll = 3.0566 4.4423 x1 = 4 x2 = 5 roll = 4.4521 1.1513 x1 = 5 x2 = 2 roll = 0.6001 4.3673 x1 = 1 x2 = 5 roll = 2.6120 1.3471 x1 = 3 x2 = 2 roll = 5.8755 4.2282 x1 = 6 x2 = 5 roll = 5.9105 4.6211 x1 = 6 x2 = 5 roll = 2.9357 0.4994 x1 = 3 x2 = 1 roll = 5.7163 2.5458 x1 = 6 x2 = 3 roll = 4.5611 2.3571 x1 = 5 x2 = 3 roll = 2.0784 0.1786 x1 = 3 x2 = 1 roll = 2.8641 0.2833 x1 = 3 x2 = 1 roll = 5.1412 4.4282 x1 = 6 x2 = 5 roll = 4.4237 2.7336 x1 = 5 x2 = 3 roll = 1.8267 3.1106 x1 = 2 x2 = 4 roll = 5.0708 1.7372 x1 = 6 x2 = 2 roll = 1.8070 0.7398 x1 = 2 x2 = 1 roll = 1.5752 4.0027 x1 = 2 x2 = 5 roll = 3.6507 0.5945 x1 = 4 x2 = 1 roll = 1.1782 3.9150 x1 = 2 x2 = 4 roll = 4.6892 0.6489 x1 = 5 x2 = 1 roll = 0.3580 5.4516 x1 = 1 x2 = 6 roll = 3.5601 4.1425 x1 = 4 x2 = 5 roll = 2.6133 2.7822 x1 = 3 x2 = 3 roll = 0.0636 1.7882 x1 = 1 x2 = 2 roll = 4.9111 0.0169 x1 = 5 x2 = 1 roll = 3.3717 0.9272 x1 = 4 x2 = 1 roll = 3.3342 3.0413 x1 = 4 x2 = 4 roll = 2.5790 4.5675 x1 = 3 x2 = 5 roll = 3.3215 2.8700 x1 = 4 x2 = 3 roll = 1.4309 0.5613 x1 = 2 x2 = 1 roll = 1.3260 1.6806 x1 = 2 x2 = 2 roll = 4.3046 1.8875 x1 = 5 x2 = 2 roll = 5.3947 1.1273 x1 = 6 x2 = 2 roll = 0.3530 0.5435 x1 = 1 x2 = ...

Suggested Problems

More from this Author57