Cody

Solution 311278

Submitted on 27 Aug 2013 by Hooman
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)

X = 0.4505 0.0838 X = 0.2290 0.9133 X = 0.1524 0.8258 X = 0.5383 0.9961 X = 0.0782 0.4427 X = 0.1067 0.9619 X = 0.0046 0.7749 X = 0.8173 0.8687 X = 0.0844 0.3998 X = 0.2599 0.8001 X = 0.4314 0.9106 X = 0.1818 0.2638 X = 0.1455 0.1361 X = 0.8693 0.5797 X = 0.5499 0.1450 X = 0.8530 0.6221 X = 0.3510 0.5132 X = 0.4018 0.0760 X = 0.2399 0.1233 X = 0.1839 0.2400 X = 0.4173 0.0497 X = 0.9027 0.9448 X = 0.4909 0.4893 X = 0.3377 0.9001 X = 0.3692 0.1112 X = 0.7803 0.3897 X = 0.2417 0.4039 X = 0.0965 0.1320 X = 0.9421 0.9561 X = 0.5752 0.0598 X = 0.2348 0.3532 X = 0.8212 0.0154 X = 0.0430 0.1690 X = 0.6491 0.7317 X = 0.6477 0.4509 X = 0.5470 0.2963 X = 0.7447 0.1890 X = 0.6868 0.1835 X = 0.3685 0.6256 X = 0.7802 0.0811 X = 0.9294 0.7757 X = 0.4868 0.4359 X = 0.4468 0.3063 X = 0.5085 0.5108 X = 0.8176 0.7948 X = 0.6443 0.3786 X = 0.8116 0.5328 X = 0.3507 0.9390 X = 0.8759 0.5502 X = 0.6225 0.5870 X = 0.2077 0.3012 X = 0.4709 0.2305 X = 0.8443 0.1948 X = 0.2259 0.1707 X = 0.2277 0.4357 X = 0.3111 0.9234 X = 0.4302 0.1848 X = 0.9049 0.9797 X = 0.4389 0.1111 X = 0.2581 0.4087 X = 0.5949 0.2622 X = 0.6028 0.7112 X = 0.2217 0.1174 X = 0.2967 0.3188 X = 0.4242 0.5079 X = 0.0855 0.2625 X = 0.8010 0.0292 X = 0.9289 0.7303 X = 0.4886 0.5785 X = 0.2373 0.4588 X = 0.9631 0.5468 X = 0.5211 0.2316 X = 0.4889 0.6241 X = 0.6791 0.3955 X = 0.3674 0.9880 X = 0.0377 0.8852 X = 0.9133 0.7962 X = 0.0987 0.2619 X = 0.3354 0.6797 X = 0.1366 0.7212 X = 0.1068 0.6538 X = 0.4942 0.7791 X = 0.7150 0.9037 X = 0.8909 0.3342 X = 0.6987 0.1978 X = 0.0305 0.7441 X = 0.5000 0.4799 X = 0.9047 0.6099 X = 0.6177 0.8594 X = 0.8055 0.5767 X = 0.1829 0.2399 X = 0.8865 0.0287 X = 0.4899 0.1679 X = 0.9787 0.7127 X = 0.5005 0.4711 X = 0.0596 0.6820 X = 0.0424 0.0714 X = 0.5216 0.0967 X = 0.8181 0.8175 X = 0.7224 0.1499 X = 0.6596 0.5186 X = 0.9730 0.6490 X = 0.8003 0.4538 X = 0.4324 0.8253 X = 0.0835 0.1332 X = 0.1734 0.3909 X = 0.8314 0.8034 X = 0.0605 0.3993 X = 0.5269 0.4168 X = 0.6569 0.6280 X = 0.2920 0.4317 X = 0.0155 0.9841 X = 0.1672 0.1062 X = 0.3724 0.1981 X = 0.4897 0.3395 X = 0.9516 0.9203 X = 0.0527 0.7379 X = 0.2691 0.4228 X = 0.5479 0.9427 X = 0.4177 0.9831 X = 0.3015 0.7011 X = 0.6663 0.5391 X = 0.6981 0.6665 X = 0.1781 0.1280 X = 0.9991 0.1711 X = 0.0326 0.5612 X = 0.8819 0.6692 X = 0.1904 0.3689 X = 0.4607 0.9816 X = 0.1564 0.8555 X = 0.6448 0.3763 X = 0.1909 0.4283 X = 0.4820 0.1206 X = 0.5895 0.2262 X = 0.3846 0.5830 X = 0.2518 0.2904 X = 0.6171 0.2653 X = 0.8244 0.9827 X = 0.7302 0.3439 X = 0.5841 0.1078 X = 0.9063 0.8797 X = 0.8178 0.2607 X = 0.5944 0.0225 X = 0.4253 0.3127 X = 0.1615 0.1788 X = 0.4229 0.0942 X = 0.5985 0.4709 X = 0.6959 0.6999 X = 0.6385 0.0336 X = 0.0688 0.3196 X = 0.5309 0.6544 X = 0.4076 0.8200 X = 0.7184 0.9686 X = 0.5313 0.3251 X = 0.1056 0.6110 X = 0.7788 0.4235 X = 0.0908 0.2665 X = 0.1537 0.2810 X = 0.4401 0.5271 X = 0.4574 0.8754 X = 0.5181 0.9436 X = 0.6377 0.9577 X = 0.2407 0.6761 X = 0.2891 0.6718 X = 0.6951 0.0680 X = 0.2548 0.2240 X = 0.6678 0.8444 X = 0.3445 0.7805 X = 0.6753 0.0067 X = 0.6022 0.3868 X = 0.9160 0.0012 X = 0.4624 0.4243 X = 0.4609 0.7702 X = 0.3225 0.7847 X = 0.4714 0.0358 X = 0.1759 0.7218 X = 0.4735 0.1527 X = 0.3411 0.6074 X = 0.1917 0.7384 X = 0.2428 0.9174 X = 0.2691 0.7655 X = 0.1887 0.2875 X = 0.0911 0.5762 X = 0.6834 0.5466 X = 0.4257 0.6444 X = 0.6476 0.6790 X = 0.6358 0.9452 X = 0.2089 0.7093 X = 0.2362 0.1194 X = 0.6073 0.4501 X = 0.4587 0.6619 X = 0.7703 0.3502 X = 0.6620 0.4162 X = 0.8419 0.8329 X = 0.2564 0.6135 X = 0.5822 0.5407 X = 0.8699 0.2648 X = 0.3181 0.1192 X = 0.9398 0.6456 X = 0.4795 0.6393 X = 0.5447 0.6473 X = 0.5439 0.7210 X = 0.5225 0.9937 X = 0.2187 0.1058 X = 0.1097 0.0636 X = 0.4046 0.4484 X = 0.3658 0.7635 X = 0.6279 0.7720 X = 0.9329 0.9727 X = 0.1920 0.1389 X = 0.6963 0.0938 X = 0.5254 0.5303 X = 0.8611 0.4849 X = 0.3935 0.6714 X = 0.7413 0.5201 X = 0.3477 0.1500 X = 0.5861 0.2621 X = 0.0445 0.7549 X = 0.2428 0.4424 X = 0.6878 0.3592 X = 0.7363 0.3947 X = 0.6834 0.7040 X = 0.4423 0.0196 X = 0.3309 0.4243 X = 0.2703 0.1971 X = 0.8217 0.4299 X = 0.8878 0.3912 X = 0.7691 0.3968 X = 0.8085 0.7551 X = 0.3774 0.2160 X = 0.7904 0.9493 X = 0.3276 0.6713 X = 0.4386 0.8335 X = 0.7689 0.1673 X = 0.8620 0.9899 X = 0.5144 0.8843 X = 0.5880 0.1548 X = 0.1999 0.4070 X = 0.7487 0.8256 X = 0.7900 0.3185 X = 0.5341 0.0900 X = 0.1117 0.1363 X = 0.6787 0.4952 X = 0.1897 0.4950 X = 0.1476 0.0550 X = 0.8507 0.5606 X = 0.9296 0.6967 X = 0.5828 0.8154 X = 0.8790 0.9889 X = 0.0005 0.8654 X = 0.6126 0.9900 X = 0.5277 0.4795 X = 0.8013 0.2278 X = 0.4981 0.9009 X = 0.5747 0.8452 X = 0.7386 0.5860 X = 0.2467 0.6664 X = 0.0835 0.6260 X = 0.6609 0.7298 X = 0.8908 0.9823 X = 0.7690 0.5814 X = 0.9283 0.5801 X = 0.0170 0.1209 X = 0.8627 0.4843 X = 0.8449 0.2094 X = 0.5523 0.6299 X = 0.0320 0.6147 X = 0.3624 0.0495 X = 0.4896 0.1925 X = 0.1231 0.2055 X = 0.1465 0.1891 X = 0.0427 0.6352 X = 0.2819 0.5386 X = 0.6952 0.4991 X = 0.5358 0.4452 X = 0.1239 0.4904 X = 0.8530 0.8739 X = 0.2703 0.2085 X = 0.5650 0.6403 X = 0.4170 0.2060 X = 0.9479 0.0821 X = 0.1057 0.1420 X = 0.1665 0.6210 X = 0.5737 0.0521 X = 0.9312 0.7287 X = 0.7378 0.0634 X = 0.8604 0.9344 X = 0.9844 0.8589 X = 0.7856 0.5134 X = 0.1776 0.3986 X = 0.1339 0.0309 X = 0.9391 0.3013 X = 0.2955 0.3329 X = 0.4671 0.6482 X = 0.0252 0.8422 X = 0.5590 0.8541 X = 0.3479 0.4460 X = 0.0542 0.1771 X = 0.6628 0.3308 X = 0.8985 0.1182 X = 0.9884 0.5400 X = 0.7069 0.9995 X = 0.2878 0.4145 X = 0.4648 0.7640 X = 0.8182 0.1002 X = 0.1781 0.3596 X = 0.0567 0.5219 X = 0.3358 0.1757 X = 0.2089 0.9052 X = 0.6754 0.4685 X = 0.9121 0.1040 X = 0.7455 0.7363 X = 0.5619 0.1842 X = 0.5972 0.2999 X = 0.1341 0.2126 X = 0.8949 0.0715 X = 0.2425 0.0538 X = 0.4417 0.0133 X = 0.8972 0.1967 X = 0.0934 0.3074 X = 0.4561 0.1017 X = 0.9954 0.3321 X = 0.2973 0.0620 X = 0.2982 0.0464 X = 0.5054 0.7614 X = 0.6311 0.0899 X = 0.0809 0.7772 X = 0.9051 0.5338 X = 0.1092 0.8258 X = 0.3381 0.2940 X = 0.7463 0.0103 X = 0.0484 0.6679 X = 0.6035 0.5261 X = 0.7297 0.7073 X = 0.7814 0.2880 X = 0.6925 0.5567 X = 0.3965 0.0616 X = 0.7802 0.3376 X = 0.6079 0.7413 X = 0.1048 0.1279 X = 0.5495 0.4852 X = 0.8905 0.7990 X = 0.7343 0.0513 X = 0.0729 0.0885 X = 0.7984 0.9430 X = 0.6837 0.1321 X = 0.7227 0.1104 X = 0.1175 0.6407 X = 0.3288 0.6538 X = 0.7491 0.5832 X = 0.7400 0.2348 X = 0.7350 0.9706 X = 0.8669 0.0862 X = 0.3664 0.3692 X = 0.6850 0.5979 X = 0.7894 0.3677 X = 0.2060 0.0867 X = 0.7719 0.2057 X = 0.3883 0.5518 X = 0.2290 0.6419 X = 0.4845 0.1518 X = 0.7819 0.1006 X = 0.2941 0.2374 X = 0.5309 0.0915 X = 0.4053 0.1048 X = 0.1123 0.7844 X = 0.2916 0.6035 X = 0.9644 0.4325 X = 0.6948 0.7581 X = 0.4326 0.6555 X = 0.1098 0.9338 X = 0.1875 0.2662 X = 0.7978 0.4876 X = 0.7690 0.3960 X = 0.2729 0.0372 X = 0.6733 0.4296 X = 0.4517 0.6099 X = 0.0594 0.3158 X = 0.7727 0.6964 X = 0.1253 0.1302 X = 0.0924 0.0078 X = 0.4231 0.6556 X = 0.7229 0.5312 X = 0.1088 0.6318 X = 0.1265 ...