- محدودیت زمان: ۱ ثانیه
- محدودیت حافظه: ۲۵۶ مگابایت
Have you ever heard the phrase “Cosmic Twins”? The people who are born on the same day of the year, are called cosmic twins. he problem-setter thinks that the probability of existence of cosmic twins in group of $P$ people is relatively high, based on the number of cosmic twins found in SBU. Your task is to calculate this probability and verify his conjecture.
ورودی
The input contains two space separated integers $P, D$ – the number of people and the number of days in a year respectively.
$$1 \leq P, D \leq 400$$
خروجی
Print a number in a line indicating the probability of existence of at least one pair of cosmic twins in the group.
The result should be printed with exactly 6 digits after decimal point.
مثالها
ورودی نمونه ۱
2 2
خروجی نمونه ۱
0.500000
ورودی نمونه ۲
22 365
خروجی نمونه ۲
0.475695
ورودی نمونه ۳
23 365
خروجی نمونه ۳
0.507297
ارسال پاسخ برای این سؤال