Jump! Jump! Jump!

Time Limit: 6000/3000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)

Problem Description

One day, two frogs were trapped in n lotus leafs, they need to jump to the same lotus leaf in order to escape.

However, they can't control themselves because they were impatient.

As a result, they can only jump to the neighboring lotus leaf randomly.

Now the question is what's the expected times they need to jump to escape the circle.

Initially, the distance between them is d.

You should notice that they jump at the same moment every time.

Input

There are multiple cases.

Ease case contains two integers n and d(2 < n ≤ 100, 0 < d < n).

Output

For each test case, output one line containing "Case #x: " followed by the expected times, rounded to 2 decimal places.

If they can't escape, please output "Never Give Up" instead.

Sample Input

5 2
6 3

Sample Output

Case #1: 8.00
Case #2: Never Give Up

Source

KIDx

Manager

Information
Solved Number50
Submit Number166
Problem Tags
dfs and similar
matrices
probabilities
No tag edit access
温馨提示:AC后可以编辑标签哦. ^-^
Login
LoginCancel