Run ID:112595

提交时间:2025-03-09 18:32:31

import sys for line in sys.stdin: line = line.strip() if not line: continue parts = line.split() if len(parts) < 2: print("0.00000") continue char = parts[0].lower() word = parts[1].lower() count = word.count(char) probability = count / len(word) print("{0:.5f}".format(probability))