Back to School '17: AvalonView as PDF
vev is addicted to the game Avalon. She is currently playing a game and wants to make an informed decision on who to put on her quest. There are distinct groups of players, each with players. Of the players in the group, of them are considered to be evil (). Assuming vev chooses a single player randomly from each group, what is the probability that she selects zero evil players?
The first line contains an integer , representing the number of distinct groups of players.
The next lines each contain two space separated integers and , the number of evil players in the group, and the total players in the group respectively.
Print the probability that she chooses zero evil players. Your answer will be considered correct if it is within of the judge's answer.
Sample Input 1
2 2 4 1 2
Sample Output 1
Sample Input 2
2 0 10 10 10
Sample Output 2