UVA11864 Probability Calculation

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=226&page=show_problem&problem=2964 [PDF](https://uva.onlinejudge.org/external/118/p11864.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11864/f3130a6aa88549ec6c8597b0a3099f6f1b9fd487.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11864/4fd90df5699d390c29ad334a0679f895b3d197f6.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11864/7797176f7e2a5b1e773768c021c5b9c6d9351f9a.png)