9160: First Last

内存限制:128 MB 时间限制:1 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:1 通过:1

题目描述


Xiao Fan is playing a game with nnn players, where you always find himself ranking either first or last.



This is quite strange, right? One possible explanation is that the game system is rigged; another possible explanation is that Xiao Fan is risk-taking and would seize every opportunity to reach the top spot at the expense of lower expected scores.

Now, suppose Xiao Fan is an average player who ranks uniformly at random each time independently. How likely is it that Xiao Fan is always the ``outstanding'' one, either first or last, in mmm consecutive games?

To be more precise, in an nnn player game, an average player takes rank i (1≤i≤n)i~ (1 \leq i \leq n)i (1in) with probability 1/n1/n1/n. The first means the rank 111, and the last means the rank nnn.

输入格式


Input contains two integers, n,m (1≤n,m≤20)n, m ~ (1 \leq n, m \leq 20)n,m (1n,m20), the number of players in each game and the number of games to be considered.

输出格式


Print a real number presented by decimal format, denoting the possibility.
Your answer will be accepted if the absolute or relative error is at most 10−910 ^ {-9}109.

输入样例 复制

4 10

输出样例 复制

0.000976562500000

分类标签