Welcome to ZOJ
 Problem Sets Information Select Problem Runs Ranklist
ZOJ Problem Set - 3374

Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge

Recently, a total of 786 girls in Gensokyo sat in a circle, 203 of them were selected as the characters of next Touhou ACT game by draw. Unfortunately, Letty Whiterock didn't win, and she thought it was strange that the nine girls (Reimu, Yukari, Marisa, Alice, Sakuya, Remilia, Youmu, Yuyuko and Sanae) sitting adjacently all won. The expert (proclaimed by herself) Baka⑨ Cirno (チルノ) claimed that "the probability of this kind of combinations is only 0.000,atai,saikyou,...%, so somebody must have cheated!". Of course, nobody trusts the probability claimed by Cirno, but girls do begin to doubt the draw results.

Assume that m girls out of n are selected in eqaul probability, it will be helpful if you can calculate the right probability that there are nine adjacent girls. Remember that the n girls sit in a circle, so the first one is adjacent to the last one.

#### Input

There are multiple cases. Each cases consists of two integers: 1 ≤ n ≤ 1000 and 1 ≤ mn.

#### Output

For each case, output the probability. Answer having an absolute error less than 1e-5 will be accepted. See sample for more details.

```10 9
17 15
18 16
786 203
```

#### Sample Output

```100.000000%
87.500000%
94.117647%
0.263488%
```

#### References

Author: WU, Zejun
Source: ACM × Touhou
Contest: ZOJ Monthly, August 2010
Submit    Status