阅读背景:

生日悖论,输出不正确约1

来源:互联网 

I'm relatively new to python and wanted to test myself, by tackling the birthday problem. Rather than calculating it mathematically, I wanted to simulate it, to see if I would get the right answer. So I assigned all boolean values in the list sieve[] as False and then randomly pick a value from 0 to 364 and change it to True, if it's already True then it outputs how many times it had to iterate as an answer.I'm relatively new to python and wanted to test




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: