Sherlock And Probability Hackerrank Solution