Strasse

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

You're playing a generalized version of poker called (n,k)(n,k)-poker. A game of (n,k)(n,k)-poker consists of kk rounds. In each round, an integer between 1 and nn is picked independently and uniformly at random. You can then do one of the two things: either take this number, or skip it, and then the round ends.

You must take exactly three numbers, and you win if those three numbers form a straight --- an arithmetic progression --- after reordering them somehow. What is the probability of achieving this goal if you play optimally?

입력

The only line of the input file contains two space-separated integers nn and kk, 1n100001 \le n \le 10000, 3k100003 \le k \le 10000.

출력

Print one floating-point number: the probability of winning in (n,k)(n,k)-poker if you play optimally. Your output will be considered correct if it differs from the answer by at most 10710^{-7}.

힌트

Three numbers form an arithmetic progression in some order if and only if one of the numbers is the average of the other two.