Hey Kakao
Time limit1sMemory limit1024 MB
Given win probability d% rising by k% after each loss, find the expected time in minutes until Iha wins a round of word chain.
- Level
Easy3 of 10
- Topics
- Probability, Math, Simulation, Implementation
- Solved
- No attempts yet
Problem
Hey Kakao, the word that changes your daily life, is an AI assistant application built on Kakao Enterprise's AI platform Kakao i. With Hey Kakao, you can use a range of features such as music search, directions, and foreign language translation with a single spoken phrase.
According to the 2020 Hey Kakao year-end report, the phrase Hey Kakao heard most often after "thank you" and "hello" was "let's play word chain." Iha, fidgeting with a phone in his room, decided to play word chain with Hey Kakao to pass the time.
Iha played word chain casually for several rounds and gathered statistics. He found that one round takes minutes and that his current probability of winning is %. Disappointed with his win rate, Iha decided to now play with focus. When Iha focuses, each loss at word chain builds experience and raises his win probability by % relative to before. If the raised probability exceeds %, Iha wins for certain from the next round on.
Iha intends to keep playing word chain until he beats Hey Kakao once. Find the expected value of the time Iha spends playing word chain.
Input
The first line gives three integers separated by spaces. This means one round of word chain takes minutes, the probability that Iha, having started to focus, wins at first is %, and each loss raises his win rate by % relative to before.
All values in the input are integers.
Output
Print the expected value, in minutes, of the time Iha spends playing word chain until he wins. An absolute or relative error of at most is accepted.
Hint
In sample 1, the probability that Iha wins the first round is 50%, the probability that he wins the second round after one loss is 75%, and the probability that he wins the third round is 100%.