Three Dices Solution Codechef

There are three people, and each of them has an unbiased 66-sided die. The result of rolling a die will be a number between 11 and 66 (inclusive) with equal probability.

The three people throw their dice simultaneously. In this game, the third person wins only if his number is strictly greater than the sum of the other two numbers. Given that the first person rolls the value XX and the second person rolls the value YY, what is the probability the third person will win?

For each test case, output the probability that the third person wins.

Your answer will be considered correct if its absolute error doesn’t exceed 10610−6.

5★soumyadeep_21

12-07-2021

0.5 secs

50000 Bytes

CPP14, C, JAVA, PYTH 3.6, CPP17, PYTH, PYP3, CS2, ADA, PYPY, TEXT, PAS fpc, NODEJS, RUBY, PHP, GO, HASK, TCL, PERL, SCALA, LUA, kotlin, BASH, JS, LISP sbcl, rust, PAS gpc, BF, CLOJ, R, D, CAML, FORT, ASM, swift, FS, WSPC, LISP clisp, SQL, SCM guile, PERL6, ERL, CLPS, ICK, NICE, PRLG, ICON, COB, SCM chicken, PIKE, SCM qobi, ST, SQLQ, NEM

 

Also read : Coding Solution
Also read : Three Dices Solution Codechef

Leave a Comment