AT_abc456_b.456
入门
通过率:0%
时间限制:2.00s
内存限制:1024MB
AC君温馨提醒
该题目为【atcoder】题库的题目,您提交的代码将被提交至atcoder进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
There are three dice, each with six faces.
The j-th face of the i-th die has Ai,j written on it.
For each die, each face comes up with probability 61.
When these dice are rolled simultaneously, find the probability that the values 4,5,6 each appear exactly once.
有三个骰子,每个骰子有六个面。
第 i 个骰子的第 j 个面上写有数字 Ai,j。
对于每个骰子,每个面朝上的概率均为 61。
当这三个骰子同时掷出时,求数字 4,5,6 各恰好出现一次的概率。
输入格式
The input is given from Standard Input in the following format:
A1,1 A1,2 A1,3 A1,4 A1,5 A1,6
A2,1 A2,2 A2,3 A2,4 A2,5 A2,6
A3,1 A3,2 A3,3 A3,4 A3,5 A3,6
输入从标准输入中按以下格式给出:
A1,1 A1,2 A1,3 A1,4 A1,5 A1,6
A2,1 A2,2 A2,3 A2,4 A2,5 A2,6
A3,1 A3,2 A3,3 A3,4 A3,5 A3,6
输出格式
Output the answer. The answer is considered correct if the absolute or relative error from the true answer is at most 10−6.
输出答案。若答案与真实答案的绝对误差或相对误差不超过 10−6,则视为正确。
输入输出样例
输入#1
1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6
输出#1
0.0277777778
输入#2
4 5 6 4 5 6 4 4 5 5 6 6 6 5 4 4 5 6
输出#2
0.2222222222
说明/提示
Sample 1 Explanation:
The desired probability is 361. An output such as 0.027778 is also accepted.
Sample 2 Explanation:
The desired probability is 92.
Constraints
- Ai,j is an integer between 1 and 6, inclusive.
样例 1 解释:
所求概率为 361。输出如 0.027778 也是可接受的。
样例 2 解释:
所求概率为 92。
限制条件
- Ai,j 是介于 1 和 6(含)之间的整数。
输入解题思路,AI测评打分。不知道怎么写?