Le Monde puzzle [49]
Here is a quick-and-dirty solution to Le Monde puzzle posted a few days ago: the R code counts the number of winning tickets between 1 and N, and stops when there is a proportion of 10% of winning tickets. #winning ticket win=function(n){ #decimal digits decomposition x=rep(0,4) x[4]=n%%10 m=(... [Read more...]