I think the unit tests are wrong. In particular lottery(12,11)=66 not 6.
Great catch! That one is now fixed. That happened when I was copying the results of the array of values from 1-12 for lottery(12,x). I guess the values for 11 and 12 were on the next line, and I accidentally deleted one of the 6s in 66 for lottery(12,11). I'll double check the rest of them when I get back on my machine that has MATLAB on it. I'm rescoring now.
Knight's Tour Checker
Swap the input arguments
2 b | ~ 2 b
Number of digits in an integer
Number of Even Elements in Fibonacci Sequence
I'm going to enjoy watching you calculate, Mr Anderson
It's Happy! It's Fun! It's Happy Fun Hyperball!
Miles to go before I sleep
How Far Can You Throw Something?
Give me Hamming on five, hold the mayo
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office