mean(replicate(100000, anyDuplicated(sample(18, 19, TRUE))))
Standard input is empty
[1] 6.01451
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!