Problem F
Expected Earnings
Johan likes to play at the casino, but he wonders if a particular slot machine is worth playing on.
If Johan wins a game on the machine, he gets $n$ Swedish kronor. He wins with the probability $p$. It costs $k$ kronor to play.
Since Johan is not the sharpest tool in the shed, he thought the goal of playing is to lose as much money as possible, i.e he only wants to play if he will lose money in the long run by playing on the slot machine. Determine if Johan should play on the machine or not.
Input
The input contains the two integers $n$ ($1 \le n \le 100$) and $k$ ($1 \le k \le 100$), and the real number $p$ ($0 \le p \le 1$).
$p$ will have at most 8 digits after the decimal point.
Output
If the expected value of playing the slot machine is negative, you should print spela. Otherwise, you should print spela inte!.
Sample Input 1 | Sample Output 1 |
---|---|
15 6 0.9 |
spela inte! |
Sample Input 2 | Sample Output 2 |
---|---|
10 5 0.46 |
spela |
Sample Input 3 | Sample Output 3 |
---|---|
10 5 0.5 |
spela inte! |