#T765. 字母概率
字母概率
Description
Xiao Ming has recently become very interested in probability problems. One day, Xiao Ming and Xiao Hong played a probability game together. First, Xiao Ming provides a letter and a word, and then Xiao Hong calculates the probability of that letter appearing in the word. The letter is case-insensitive.
For example, if the given letter is a and the word is apple, the probability is 0.20000.
Input Format
The input contains multiple test cases. Each test case consists of a letter and a word. The length of the word does not exceed 200.
Output Format
For each input, output the corresponding probability, rounded to 5 decimal places.
a apple
c Candy
a banana
0.20000
0.20000
0.50000
译文
CodesOnline