Problem C
DCC líkur
Languages
en
is
Alice, Egill and Máni have gathered among others to play tabletop RPGs. The system they are using is called DCC (Dragon Claw Conundrums). Máni is the GM so he asks Alice and Egill to each throw a die to determine who wins the in-game armwrestling contest they are engaging in. But in DCC bonuses to dice rolls work a bit differently to most other tabletop RPGs where a constant is added to the dice roll. In DCC there is a dice chain which is as follows
\[ 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 30 \]Adding $1d$ to the dice
means you move up one die in the chain. So rolling an
$8$ sided die with a
$2d$ bonus means throwing
a $12$ sided die. All
these dice have sides numbered from $1$ up to the number of sides. They
are all fair, meaning every outcome is equally likely. Bonuses
to rolls can not take you beyond a $30$ sided die.
Egill is supposed to roll an $n$ sided die and Alice an $m$ sided die. Alice is wondering how far she is from having at least a $p\% $ chance of winning. That is to say, how many $+d$ does Alice need so she has at least a $p\% $ chance of rolling a higher number than Egill?
Input
The first line of the input contains two integers $n, m$. $n$ and $m$ will always be one of the numbers in the dice chain above. The second and last line of the input contains one integer $0 \leq p \leq 100$.
Output
Print the smallest number $k$ such that if Alice gets a $+kd$ bonus she has at least a $p\% $ chance of rolling a higher number than Egill. If no such number $k$ exists you should instead print Vonlaust!.
Sample Input 1 | Sample Output 1 |
---|---|
5 24 25 |
6 |
Sample Input 2 | Sample Output 2 |
---|---|
24 12 70 |
0 |
Sample Input 3 | Sample Output 3 |
---|---|
5 30 51 |
Vonlaust! |