Number of combinations for the first code: "N_1=10^6=1000000."
Number of combinations for the second code: "N_2=10^3*24^2=576000."
i) Since "N_1>N_2", the first code is better.
ii) "N=N_1N_2=1000000*576000=576000000000=5.76*10^{11}."
"P=\\frac{1}{N}=1.7361*10^{-12}."
Comments
Leave a comment