编程介的小学生 2017-11-30 17:27 采纳率: 20.5%
浏览 940
已采纳

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-11-30 17:58
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体
  • ¥88 实在没有想法,需要个思路
  • ¥15 MATLAB报错输入参数太多
  • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败