Probability for Dummies
Statement
Goal
Burt studies math but is too dumb to derive fancy formulas, so he solves his homework problems using random numbers.Given an American roulette wheel with 38 possible outcomes (0-36 or 00), what are the odds of landing on at least m different numbers in n spins?
Input
Line 1: m
Line 2: n
Line 2: n
Output
The probability rounded to the nearest percent.
Constraints
1 ≤ m ≤ 38
m ≤ n ≤ 50
m ≤ n ≤ 50
Example
Input
6 7
Output
92%
Tags
Difficulty
Easy
Test cases
Test 1 Test
Input
6
7
Output
92%
Validator 1 Validator
Input
8
11
Output
98%
Test 2 Test
Input
13
14
Output
30%
Validator 2 Validator
Input
14
15
Output
22%
Test 3 Test
Input
21
25
Output
11%
Validator 3 Validator
Input
22
27
Output
12%
Test 4 Test
Input
24
37
Output
57%
Validator 4 Validator
Input
24
36
Output
49%
Test 5 Test
Input
30
49
Output
18%
Validator 5 Validator
Input
29
46
Output
20%
Solution language
Solution
Stub generator input