A – Cosmic Twins


  • محدودیت زمان: ۱ ثانیه
  • محدودیت حافظه: ۲۵۶ مگابایت

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 PP 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,DP, D – the number of people and the number of days in a year respectively.

1P,D4001 \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
Plain text

خروجی نمونه ۱🔗

0.500000
Plain text

ورودی نمونه ۲🔗

22 365
Plain text

خروجی نمونه ۲🔗

0.475695
Plain text

ورودی نمونه ۳🔗

23 365
Plain text

خروجی نمونه ۳🔗

0.507297
Plain text