编程介的小学生 2017-07-17 07:48 采纳率: 20.5%
浏览 733
已采纳

Probability

Problem Description
Mickey is interested in probability recently. One day , he played a game which is about probability with mini.First mickey gives a letter and a word to mini.Then mini calculate the probability that the letter appears in the word.For example,give you the letter "a" and the word "apple". the probability of this case is 0.20000.

Input
The input contains several test cases. Each test case consists of a letter and a word.The length of the word is no longer than 200.

Output
For each test case, print the probability rounded to five digits after the decimal point.

Sample Input
a apple
c Candy
a banana

Sample Output
0.20000
0.20000
0.50000

  • 写回答

1条回答

  • threenewbee 2017-08-01 15:49
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大