# Arup Guha
# 11/12/2020
# Birthday Problem Probabilities

# Number of possible birthdays and K = max people in the room.
N = 365
K = 100
pUnique = 1.0

# Go through asking each new person when their birthday is.
for i in range(N, N-K, -1):

    # This is the probability it's different than all previous ones.
    pUnique = pUnique*i/N

    # Here is the chance of a match...first # is # of people in the room.
    print(N-i+1, 1-pUnique)
