← All problemsSign in

Monkey Time

Cheese the monkey has got his hands on a computer keyboard and is pounding away on it. This keyboard is custom-made and has only the alphabet A-E and space. You are given the probabilities of Cheese pressing each of the alphabet A-E as p1, p2 … to p5 with Cheese pressing space otherwise. You are to write a program to find the probability that the number of letters on the screen is k (1 Input Two

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start