← All problemsSign in

Predictopus

CodeChefRating 1510Open on judge ↗

Chef Datta likes betting in Indian Premier League very much. He has 10000 rupees. Today the match is between team A and team B. The winning probability of team A is PA, and hence winning probability of team B is PB = 1 − PA. Datta is free to bet any integral amount of money on any of the two teams as long as the total amount of money bet is at most 10000 rupees. Help him know the expected amount

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